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/head64.S | |
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/head64.S')
-rw-r--r-- | arch/s390/kernel/head64.S | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index f525c0c21250..28c50bdf7d40 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -658,10 +658,8 @@ startup:basr %r13,0 # get base | |||
658 | # | 658 | # |
659 | la %r1,0f-.LPG1(%r13) # set program check address | 659 | la %r1,0f-.LPG1(%r13) # set program check address |
660 | stg %r1,__LC_PGM_NEW_PSW+8 | 660 | stg %r1,__LC_PGM_NEW_PSW+8 |
661 | mvc __LC_DIAG44_OPCODE(8),.Lnop-.LPG1(%r13) | ||
662 | diag 0,0,0x44 # test diag 0x44 | 661 | diag 0,0,0x44 # test diag 0x44 |
663 | oi 7(%r12),32 # set diag44 flag | 662 | oi 7(%r12),32 # set diag44 flag |
664 | mvc __LC_DIAG44_OPCODE(8),.Ldiag44-.LPG1(%r13) | ||
665 | 0: | 663 | 0: |
666 | 664 | ||
667 | # | 665 | # |
@@ -702,7 +700,6 @@ startup:basr %r13,0 # get base | |||
702 | .L4malign:.quad 0xffffffffffc00000 | 700 | .L4malign:.quad 0xffffffffffc00000 |
703 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 | 701 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 |
704 | .Lnop: .long 0x07000700 | 702 | .Lnop: .long 0x07000700 |
705 | .Ldiag44:.long 0x83000044 | ||
706 | 703 | ||
707 | .org PARMAREA-64 | 704 | .org PARMAREA-64 |
708 | .Lduct: .long 0,0,0,0,0,0,0,0 | 705 | .Lduct: .long 0,0,0,0,0,0,0,0 |