linux/include
Jeremy Fitzhardinge 8efcbab674 paravirt: introduce a "lock-byte" spinlock implementation
Implement a version of the old spinlock algorithm, in which everyone
spins waiting for a lock byte.  In order to be compatible with the
ticket-lock's use of a zero initializer, this uses the convention of
'0' for unlocked and '1' for locked.

This algorithm is much better than ticket locks in a virtual
envionment, because it doesn't interact badly with the vcpu scheduler.
If there are multiple vcpus spinning on a lock and the lock is
released, the next vcpu to be scheduled will take the lock, rather
than cycling around until the next ticketed vcpu gets it.

To use this, you must call paravirt_use_bytelocks() very early, before
any spinlocks have been taken.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Christoph Lameter <clameter@linux-foundation.org>
Cc: Petr Tesarik <ptesarik@suse.cz>
Cc: Virtualization <virtualization@lists.linux-foundation.org>
Cc: Xen devel <xen-devel@lists.xensource.com>
Cc: Thomas Friebel <thomas.friebel@amd.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-16 11:15:53 +02:00
..
acpi
asm-alpha
asm-arm Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
asm-avr32 Merge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 2008-07-14 13:37:29 -07:00
asm-blackfin
asm-cris
asm-frv frv: fix irqs_disabled() to return an int, not an unsigned long 2008-07-12 14:33:42 -07:00
asm-generic mm: fix build on non-mmu machines 2008-07-15 13:58:40 -07:00
asm-h8300
asm-ia64
asm-m32r
asm-m68k
asm-m68knommu
asm-mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2008-07-15 15:01:29 -07:00
asm-mn10300
asm-parisc
asm-powerpc Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
asm-s390 [S390] Remove P390 support. 2008-07-14 10:02:25 +02:00
asm-sh
asm-sparc
asm-sparc64
asm-um
asm-v850
asm-x86 paravirt: introduce a "lock-byte" spinlock implementation 2008-07-16 11:15:53 +02:00
asm-xtensa
crypto crypto: hash - Move ahash functions into crypto/hash.h 2008-07-10 20:35:18 +08:00
drm drm/radeon: fixup issue with radeon and PAT support. 2008-07-15 15:48:05 +10:00
keys
linux Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2008-07-15 19:04:58 -07:00
math-emu
media
mtd
net
pcmcia
rdma RDMA/addr: Keep pointer to netdevice in struct rdma_dev_addr 2008-07-14 23:48:53 -07:00
rxrpc
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
sound ALSA: Release v1.0.17 2008-07-14 09:54:43 +02:00
video
xen xen64: fix !HVC_XEN build dependency 2008-07-16 11:06:48 +02:00
Kbuild drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00