linux/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
..
Kbuild Fix exported headers for SPARC, SPARC64 2006-09-21 08:48:27 +01:00
a.out.h [SPARC64]: Increase top of 32-bit process stack. 2006-03-20 01:16:36 -08:00
agp.h
apb.h
asi.h [SPARC64]: Sun4v specific ASI defines. 2006-03-20 01:11:43 -08:00
atomic.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
auxio.h
auxvec.h [PATCH] auxiliary vector cleanups 2005-09-07 16:57:21 -07:00
bbc.h
bitops.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
bpp.h
bsderrno.h
bug.h
bugs.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
byteorder.h
cache.h [PATCH] Move read_mostly definition to asm/cache.h 2006-03-23 07:38:10 -08:00
cacheflush.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
chafsr.h
checksum.h
chmctrl.h
cmt.h
compat.h [PATCH] compat: be more consistent about [ug]id_t 2005-09-07 16:57:19 -07:00
const.h
cpudata.h [SPARC64]: Send all device interrupts via one PIL. 2006-06-20 01:20:00 -07:00
cputime.h
current.h
dcr.h
dcu.h
delay.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
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 Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ebus.h [SPARC64]: Add of_device layer and make ebus/isa use it. 2006-06-23 23:15:43 -07:00
elf.h [SPARC64]: Add HWCAP_SPARC_BLKINIT elf capability flag for Niagara. 2006-03-20 01:13:26 -08:00
emergency-restart.h
envctrl.h
errno.h
estate.h
fbio.h
fcntl.h [PATCH] Clean up struct flock definitions 2005-09-07 16:57:38 -07:00
fhc.h [SPARC64]: Convert central bus layer to in-kernel PROM device tree. 2006-06-23 23:15:32 -07:00
floppy.h [PATCH] irq-flags: SPARC64: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
fpumacro.h
futex.h [SPARC64]: Implement futex_atomic_cmpxchg_inatomic(). 2006-03-28 01:00:08 -08:00
hardirq.h [SPARC64]: Move over to GENERIC_HARDIRQS. 2006-06-20 01:23:32 -07:00
head.h [SPARC64]: Add GET_GL_GLOBAL() macro for SUN4V. 2006-03-20 01:13:18 -08:00
hw_irq.h [SPARC64]: Move over to GENERIC_HARDIRQS. 2006-06-20 01:23:32 -07:00
hypervisor.h [SPARC64]: Fix bugs in SUN4V cpu mondo dispatch. 2006-03-20 01:14:09 -08:00
ide.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
idprom.h [SPARC]: Clean up idprom header files. 2006-03-20 01:12:08 -08:00
intr_queue.h [SPARC64]: Sun4v interrupt queue register definitions. 2006-03-20 01:11:44 -08:00
io.h [SPARC64]: Use 'unsigned long' for port argument to I/O string ops. 2005-08-31 15:01:33 -07:00
ioctl.h
ioctls.h
iommu.h
ipc.h
ipcbuf.h
irq.h Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2006-06-20 17:39:28 -07:00
isa.h [SPARC64]: Add of_device layer and make ebus/isa use it. 2006-06-23 23:15:43 -07:00
kdebug.h [PATCH] Notify page fault call chain for sparc64 2006-06-26 09:58:22 -07:00
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 Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
mman.h [PATCH] IA64,sparc: local DoS with corrupted ELFs 2006-09-08 08:40:46 -07:00
mmu.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
mmu_context.h [SPARC64]: Add a secondary TSB for hugepage mappings. 2006-03-22 01:15:14 -08:00
module.h
mostek.h
msgbuf.h
mutex.h [PATCH] mutex subsystem, add default include/asm-*/mutex.h files 2006-01-09 15:59:19 -08:00
namei.h
ns87303.h
numnodes.h [SPARC64]: Move over to sparsemem. 2006-03-20 01:14:22 -08:00
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 Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
parport.h [SPARC64]: Use in-kernel PROM tree for EBUS and ISA. 2006-06-23 23:15:28 -07:00
pbm.h [SPARC64]: of_device layer IRQ resolution 2006-06-29 16:37:38 -07:00
pci.h [SPARC64]: Respect gfp_t argument to dma_alloc_coherent(). 2006-05-23 02:07:22 -07:00
pconf.h
percpu.h [PATCH] lockdep: add per_cpu_offset() 2006-07-03 15:27:00 -07:00
perfctr.h
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
pil.h [SPARC64]: Send all device interrupts via one PIL. 2006-06-20 01:20:00 -07:00
poll.h [PATCH] POLLRDHUP/EPOLLRDHUP handling for half-closed devices notifications 2006-03-25 08:22:56 -08:00
posix_types.h
processor.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
prom.h [SPARC64]: of_device layer IRQ resolution 2006-06-29 16:37:38 -07:00
psrcompat.h
pstate.h [SPARC64]: Fixup TSTATE layout diagram in asm/pstate.h 2006-03-20 01:13:02 -08:00
ptrace.h [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
reg.h
resource.h
rtc.h
rwsem-const.h
rwsem.h [PATCH] add sem_is_read/write_locked() 2005-10-29 21:40:35 -07:00
sbus.h [SPARC64]: Kill starfire_cookie from SBUS/PCI. 2006-06-29 16:37:08 -07:00
scatterlist.h
scratchpad.h [SPARC64]: Sun4v scratchpad register layout. 2006-03-20 01:11:44 -08:00
seccomp.h
sections.h
semaphore.h [PATCH] semaphore: Remove __MUTEX_INITIALIZER() 2005-10-30 17:37:27 -08:00
sembuf.h
setup.h
sfafsr.h [SPARC64]: Revamp Spitfire error trap handling. 2005-08-29 12:45:11 -07:00
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 Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
signal.h [PATCH] irq-flags: SPARC64: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
smp.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
socket.h [AF_UNIX]: Datagram getpeersec 2006-06-29 16:58:06 -07:00
sockios.h
solerrno.h
sparsemem.h [SPARC64]: Move over to sparsemem. 2006-03-20 01:14:22 -08:00
spinlock.h [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks 2006-10-01 00:39:21 -07:00
spinlock_types.h [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
spitfire.h [SPARC64]: Add 'hypervisor' to ultra_tlb_type enumeration. 2006-03-20 01:11:39 -08:00
starfire.h [SPARC64]: Kill starfire_cookie from SBUS/PCI. 2006-06-29 16:37:08 -07:00
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 [SPARC]: remove duplicate TIOCPKT_ definitions 2005-11-07 14:10:42 -08:00
thread_info.h [SPARC64]: Correctable ECC errors cannot occur at trap level > 0. 2006-03-20 01:11:33 -08:00
timer.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
timex.h [SPARC64]: Define ARCH_HAS_READ_CURRENT_TIMER. 2006-03-20 01:13:29 -08:00
tlb.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
tlbflush.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-05-06 19:59:18 +01:00
topology.h [PATCH] sched: mc/smt power savings sched policy 2006-06-27 17:32:45 -07:00
tsb.h [SPARC64]: Create a seperate kernel TSB for 4MB/256MB mappings. 2006-03-20 01:13:56 -08:00
ttable.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
types.h [PATCH] sab: consolidate kmem_bufctl_t 2005-09-05 00:05:48 -07:00
uaccess.h [SPARC64]: __bzero_noasi --> __clear_user 2006-03-20 01:13:28 -08:00
uctx.h
unaligned.h
unistd.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-05-24 09:22:21 +01:00
upa.h
user.h
utrap.h
vga.h [PATCH] vgacon: make VGA_MAP_MEM take size, remove extra use 2006-06-22 15:05:58 -07:00
visasm.h
watchdog.h
xor.h [SPARC64]: Niagara optimized XOR functions for RAID. 2006-03-20 01:14:03 -08:00