mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
[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>
This commit is contained in:
parent
8449d003f3
commit
951f22d5b1
9 changed files with 228 additions and 188 deletions
|
@ -114,6 +114,7 @@ extern int unaligned_enabled;
|
|||
extern int sysctl_ieee_emulation_warnings;
|
||||
#endif
|
||||
extern int sysctl_userprocess_debug;
|
||||
extern int spin_retry;
|
||||
#endif
|
||||
|
||||
extern int sysctl_hz_timer;
|
||||
|
@ -647,7 +648,16 @@ static ctl_table kern_table[] = {
|
|||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec,
|
||||
},
|
||||
|
||||
#if defined(CONFIG_ARCH_S390)
|
||||
{
|
||||
.ctl_name = KERN_SPIN_RETRY,
|
||||
.procname = "spin_retry",
|
||||
.data = &spin_retry,
|
||||
.maxlen = sizeof (int),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec,
|
||||
},
|
||||
#endif
|
||||
{ .ctl_name = 0 }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue