linux/include/asm-ppc
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
..
8xx_immap.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
amigahw.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
amigaints.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
amigappc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
amigayle.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
amipcmcia.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ans-lcd.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bootinfo.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
bootx.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
btext.h [PATCH] powerpc: Unify udbg (#2) 2006-01-09 14:49:54 +11:00
commproc.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-05-06 19:59:18 +01:00
cpm2.h [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
delay.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
floppy.h [PATCH] irq-flags: PPC: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
gg2.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gt64260.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gt64260_defs.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
harrier.h [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
hawk.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hawk_defs.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
highmem.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hydra.h [PATCH] ppc trivial iomem annotations: chrp 2005-04-24 14:58:08 -07:00
ibm4xx.h [PATCH] #elif that should've been #elif defined 2006-09-23 11:34:43 -07:00
ibm44x.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ibm403.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ibm405.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ibm_ocp.h [PATCH] ppc32: remove "jumbo" member from ocp_func_emac_data 2006-01-06 08:33:30 -08:00
ibm_ocp_pci.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
immap_85xx.h [PATCH] Update email address for Kumar 2005-11-13 18:14:10 -08:00
immap_cpm2.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io.h [POWERPC] convert string i/o operations to C 2006-09-20 14:06:18 +10:00
kgdb.h [PATCH] ppc: Fix ARCH=ppc build with xmon 2005-11-08 11:19:48 +11:00
m48t35.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
m8260_pci.h [PATCH] ppc32: Support for 82xx PQII on-chip PCI bridge 2005-05-28 16:46:15 -07:00
machdep.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
md.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mk48t59.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mmu.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
mmu_context.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
mpc8xx.h [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
mpc10x.h [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
mpc52xx.h [PATCH] ppc32: Reorganize and complete MPC52xx initial cpu setup 2006-03-27 14:49:00 +11:00
mpc52xx_psc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mpc83xx.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
mpc85xx.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
mpc8260.h [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
mpc8260_pci9.h [POWERPC] remove unused io accessors 2006-09-20 14:06:17 +10:00
mv64x60.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
mv64x60_defs.h [PATCH] ppc32: mv64x60 updates & enhancements 2005-09-05 00:06:00 -07:00
ocp.h [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree 2006-06-26 12:25:08 -07:00
ocp_ids.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
open_pic.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
page.h typo fixes: mecanism -> mechanism 2006-06-30 18:20:44 +02:00
pc_serial.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
pci-bridge.h [PATCH] powerpc: pci_address_to_pio fix 2006-01-09 15:05:56 +11:00
pci.h [PATCH] 64bit resource: change pci core and arch code to use resource_size_t 2006-06-27 09:24:00 -07:00
pgalloc.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
pgtable.h [PATCH] Standardize pxx_page macros 2006-09-26 08:48:51 -07:00
pnp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ppc4xx_dma.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ppc4xx_pic.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ppc_sys.h [PATCH] ppc32: odd fixes and improvements in ppc_sys 2006-04-28 21:05:16 +10:00
ppcboot.h [PATCH] ppc32: cleanup AMCC PPC40x eval boards to support U-Boot 2005-11-07 07:53:26 -08:00
prep_nvram.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
prom.h ppc: Remove CHRP, POWER3 and POWER4 support from arch/ppc 2006-03-28 10:22:10 +11:00
raven.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
reg_booke.h [POWERPC] 40x: Fix debug status register defines 2006-09-21 22:59:39 +10:00
residual.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rheap.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rio.h [PATCH] RapidIO support: ppc32 2005-11-07 07:53:47 -08:00
rtc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
serial.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
smp.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
spinlock.h [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks 2006-10-01 00:39:21 -07:00
suspend.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
system.h [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
time.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
todc.h [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
traps.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
zorro.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00