diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2005-07-27 14:44:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:04 -0400 |
commit | 951f22d5b1f0eaae35dafc669e3774a0c2084d10 (patch) | |
tree | 66c0131b576dadb98026da11d624df453c4c9a7c /arch/s390/kernel/setup.c | |
parent | 8449d003f323ca7a00eec38905d984ba5ec83a29 (diff) |
[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>
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index a12183989a79..5ba5a5485da9 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -431,12 +431,6 @@ setup_lowcore(void) | |||
431 | ctl_set_bit(14, 29); | 431 | ctl_set_bit(14, 29); |
432 | } | 432 | } |
433 | #endif | 433 | #endif |
434 | #ifdef CONFIG_ARCH_S390X | ||
435 | if (MACHINE_HAS_DIAG44) | ||
436 | lc->diag44_opcode = 0x83000044; | ||
437 | else | ||
438 | lc->diag44_opcode = 0x07000700; | ||
439 | #endif /* CONFIG_ARCH_S390X */ | ||
440 | set_prefix((u32)(unsigned long) lc); | 434 | set_prefix((u32)(unsigned long) lc); |
441 | } | 435 | } |
442 | 436 | ||