android_kernel_xiaomi_sm8350/include/asm-sparc64
Martin Schwidefsky ef6edc9746 [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks
On systems running with virtual cpus there is optimization potential in
regard to spinlocks and rw-locks.  If the virtual cpu that has taken a lock
is known to a cpu that wants to acquire the same lock it is beneficial to
yield the timeslice of the virtual cpu in favour of the cpu that has the
lock (directed yield).

With CONFIG_PREEMPT="n" this can be implemented by the architecture without
common code changes.  Powerpc already does this.

With CONFIG_PREEMPT="y" the lock loops are coded with _raw_spin_trylock,
_raw_read_trylock and _raw_write_trylock in kernel/spinlock.c.  If the lock
could not be taken cpu_relax is called.  A directed yield is not possible
because cpu_relax doesn't know anything about the lock.  To be able to
yield the lock in favour of the current lock holder variants of cpu_relax
for spinlocks and rw-locks are needed.  The new _raw_spin_relax,
_raw_read_relax and _raw_write_relax primitives differ from cpu_relax
insofar that they have an argument: a pointer to the lock structure.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:21 -07:00
..
a.out.h
agp.h
apb.h
asi.h
atomic.h
auxio.h
auxvec.h
bbc.h
bitops.h
bpp.h
bsderrno.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
chafsr.h
checksum.h
chmctrl.h
cmt.h
compat.h
const.h
cpudata.h
cputime.h
current.h
dcr.h
dcu.h
delay.h
display7seg.h
div64.h
dma-mapping.h [SPARC64]: Fix sparc64 build errors when CONFIG_PCI=n. 2006-07-05 20:18:39 -07:00
dma.h
ebus.h
elf.h
emergency-restart.h
envctrl.h
errno.h
estate.h
fbio.h
fcntl.h
fhc.h
floppy.h [PATCH] irq-flags: SPARC64: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
fpumacro.h
futex.h
hardirq.h
head.h
hw_irq.h
hypervisor.h
ide.h
idprom.h
intr_queue.h
io.h
ioctl.h
ioctls.h
iommu.h
ipc.h
ipcbuf.h
irq.h
isa.h
Kbuild Fix exported headers for SPARC, SPARC64 2006-09-21 08:48:27 +01:00
kdebug.h
kmap_types.h
kprobes.h [PATCH] IA64: kprobe invalidate icache of jump buffer 2006-07-31 13:28:38 -07:00
linkage.h
local.h
lsu.h
mc146818rtc.h
mman.h [PATCH] IA64,sparc: local DoS with corrupted ELFs 2006-09-08 08:40:46 -07:00
mmu_context.h
mmu.h
module.h
mostek.h
msgbuf.h
mutex.h
namei.h
ns87303.h
numnodes.h
of_device.h [SPARC64]: of_device layer IRQ resolution 2006-06-29 16:37:38 -07:00
openprom.h [SPARC64]: Fix more of_device layer IRQ bugs, and correct PROMREG_MAX. 2006-07-21 14:17:52 -07:00
openpromio.h
oplib.h [SPARC]: Kill prom_getname, unused and not implemented properly. 2006-07-21 14:17:55 -07:00
page.h Fix exported headers for SPARC, SPARC64 2006-09-21 08:48:27 +01:00
param.h
parport.h
pbm.h [SPARC64]: of_device layer IRQ resolution 2006-06-29 16:37:38 -07:00
pci.h
pconf.h
percpu.h [PATCH] lockdep: add per_cpu_offset() 2006-07-03 15:27:00 -07:00
perfctr.h
pgalloc.h
pgtable.h [PATCH] Standardize pxx_page macros 2006-09-26 08:48:51 -07:00
pil.h
poll.h
posix_types.h
processor.h
prom.h [SPARC64]: of_device layer IRQ resolution 2006-06-29 16:37:38 -07:00
psrcompat.h
pstate.h
ptrace.h
reg.h
resource.h
rtc.h
rwsem-const.h
rwsem.h
sbus.h
scatterlist.h
scratchpad.h
seccomp.h
sections.h
semaphore.h
sembuf.h
setup.h
sfafsr.h
sfp-machine.h [SPARC64]: Fix quad-float multiply emulation. 2006-07-27 16:49:21 -07:00
shmbuf.h
shmparam.h Fix exported headers for SPARC, SPARC64 2006-09-21 08:48:27 +01:00
sigcontext.h
siginfo.h
signal.h [PATCH] irq-flags: SPARC64: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
smp.h
socket.h [AF_UNIX]: Datagram getpeersec 2006-06-29 16:58:06 -07:00
sockios.h
solerrno.h
sparsemem.h
spinlock_types.h
spinlock.h [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks 2006-10-01 00:39:21 -07:00
spitfire.h
starfire.h
stat.h
statfs.h
string.h
sunbpp.h
svr4.h
system.h [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
termbits.h
termios.h
thread_info.h
timer.h
timex.h
tlb.h
tlbflush.h
topology.h
tsb.h
ttable.h
types.h
uaccess.h
uctx.h
unaligned.h
unistd.h
upa.h
user.h
utrap.h
vga.h
visasm.h
watchdog.h
xor.h