kernel-ark/include/asm-arm
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
..
arch-aaec2000
arch-at91rm9200 [ARM] 3870/1: AT91: Start removing static memory mappings 2006-09-28 18:11:22 +01:00
arch-cl7500
arch-clps711x [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem) 2006-09-29 09:18:15 -07:00
arch-ebsa110
arch-ebsa285
arch-ep93xx [PATCH] Cirrus Logic ep93xx ethernet driver 2006-09-22 20:13:23 -04:00
arch-h720x
arch-imx
arch-integrator
arch-iop32x [ARM] 3851/1: iop3xx: add io-data glantank support 2006-09-25 10:34:02 +01:00
arch-iop33x [ARM] 3832/1: iop3xx: coding style cleanup 2006-09-25 10:25:53 +01:00
arch-ixp4xx [ARM] 3856/1: Add clocksource for Intel IXP4xx platforms 2006-09-28 20:59:25 +01:00
arch-ixp23xx
arch-ixp2000
arch-l7200 [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem) 2006-09-29 09:18:15 -07:00
arch-lh7a40x
arch-netx
arch-omap [PATCH] OMAP: Add keypad driver 2006-09-29 09:18:07 -07:00
arch-pnx4008
arch-pxa USB: pxa2xx_udc understands GPIO based VBUS sensing 2006-09-27 11:58:48 -07:00
arch-realview
arch-rpc
arch-s3c2410 [ARM] 3846/1: S3C24XX: Fix osiris memory map 2006-09-25 10:33:59 +01:00
arch-sa1100
arch-shark
arch-versatile
hardware [ARM] 3864/1: Refactore sharpsl_pm 2006-09-27 20:59:22 +01:00
mach [ARM] 3855/1: Add generic time support 2006-09-28 20:59:24 +01:00
a.out.h
apm.h
assembler.h
atomic.h [ARM] 3810/1: switch atomic helpers over to raw_local_irq_{save,restore} 2006-09-25 10:25:24 +01:00
auxvec.h
bitops.h [ARM] 3852/1: convert atomic bitops and __xchg over to raw_local_irq_{save,restore} 2006-09-25 10:34:03 +01:00
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h [ARM] Use CPU_CACHE_* where possible in asm/cacheflush.h 2006-09-27 18:00:35 +01:00
checksum.h
cpu-multi32.h
cpu-single.h
cpu.h
cputime.h
current.h
delay.h
div64.h
dma-mapping.h
dma.h
domain.h
dyntick.h
ecard.h
elf.h [HEADERS] Fix ARM 'make headers_check' 2006-09-21 08:34:39 +01:00
emergency-restart.h
errno.h
fcntl.h
fiq.h
flat.h [ARM] nommu: create flat.h to support uClinux flat binaries 2006-09-20 14:58:35 +01:00
floppy.h
fpstate.h
futex.h
glue.h
hardirq.h
hardware.h
hw_irq.h
ide.h
io.h [ARM] 3813/1: prevent >= 4G /dev/mem mmap() 2006-09-25 10:25:26 +01:00
ioctl.h
ioctls.h
ipc.h
ipcbuf.h
irq.h
irqflags.h [ARM] Add ARM irqtrace support 2006-09-20 14:58:35 +01:00
Kbuild
kmap_types.h
leds.h
limits.h
linkage.h
local.h
locks.h
mc146818rtc.h
memory.h
mman.h
mmu_context.h
mmu.h
mmzone.h
module.h
msgbuf.h
mtd-xip.h
mutex.h
namei.h
nwflash.h
page-nommu.h
page.h Merge master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-upstream into devel 2006-09-27 19:57:54 +01:00
param.h
parport.h
pci.h
percpu.h
pgalloc.h
pgtable-hwdef.h
pgtable-nommu.h
pgtable.h Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-09-28 14:40:39 -07:00
poll.h
posix_types.h
proc-fns.h [ARM] nommu: add ARM946E-S core support 2006-09-27 17:39:19 +01:00
processor.h
procinfo.h
ptrace.h
resource.h
rtc.h
scatterlist.h
sections.h
segment.h
semaphore-helper.h
semaphore.h
sembuf.h
serial.h
setup.h [ARM] Separate page table manipulation code from bootmem initialisation 2006-09-27 10:10:58 +01:00
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sizes.h
smp.h
socket.h
sockios.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
stat.h
statfs.h
string.h
suspend.h
system.h [ARM] nommu: manage the CP15 things 2006-09-27 17:34:30 +01:00
termbits.h
termios.h
therm.h
thread_info.h
thread_notify.h
timeofday.h [ARM] 3855/1: Add generic time support 2006-09-28 20:59:24 +01:00
timex.h
tlb.h
tlbflush.h [ARM] 3759/2: Remove uses of %? 2006-09-20 14:58:35 +01:00
topology.h
traps.h
types.h
uaccess.h
ucontext.h
unaligned.h [ARM] 3849/1: fix get_unaligned() for gcc >= 4.1 2006-09-25 10:34:00 +01:00
unistd.h [PATCH] consistently use MAX_ERRNO in __syscall_return 2006-09-27 08:26:18 -07:00
user.h
vfp.h
vfpmacros.h
vga.h
xor.h