]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] s390: spin lock retry
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 27 Jul 2005 18:44:57 +0000 (11:44 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Jul 2005 23:26:04 +0000 (16:26 -0700)
commit951f22d5b1f0eaae35dafc669e3774a0c2084d10
tree66c0131b576dadb98026da11d624df453c4c9a7c
parent8449d003f323ca7a00eec38905d984ba5ec83a29
[PATCH] s390: spin lock retry

Split spin lock and r/w lock implementation into a single try which is done
inline and an out of line function that repeatedly tries to get the lock
before doing the cpu_relax().  Add a system control to set the number of
retries before a cpu is yielded.

The reason for the spin lock retry is that the diagnose 0x44 that is used to
give up the virtual cpu is quite expensive.  For spin locks that are held only
for a short period of time the costs of the diagnoses outweights the savings
for spin locks that are held for a longer timer.  The default retry count is
1000.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/s390/kernel/head64.S
arch/s390/kernel/setup.c
arch/s390/lib/Makefile
arch/s390/lib/spinlock.c [new file with mode: 0644]
include/asm-s390/lowcore.h
include/asm-s390/processor.h
include/asm-s390/spinlock.h
include/linux/sysctl.h
kernel/sysctl.c