diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-09-19 17:34:46 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-09-19 17:34:46 -0400 |
commit | 1799e35d5baab6e06168b46cc78b968e728ea3d1 (patch) | |
tree | cccf64a62fa9106aa18253371b675925c0582bab /kernel/sysctl.c | |
parent | a88a8eff1e6e32d3288986a9d36c6a449c032d3a (diff) |
sched: add /proc/sys/kernel/sched_compat_yield
add /proc/sys/kernel/sched_compat_yield to make sys_sched_yield()
more agressive, by moving the yielding task to the last position
in the rbtree.
with sched_compat_yield=0:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2539 mingo 20 0 1576 252 204 R 50 0.0 0:02.03 loop_yield
2541 mingo 20 0 1576 244 196 R 50 0.0 0:02.05 loop
with sched_compat_yield=1:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2584 mingo 20 0 1576 248 196 R 99 0.0 0:52.45 loop
2582 mingo 20 0 1576 256 204 R 0 0.0 0:00.00 loop_yield
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 6ace893c17c9..53a456ebf6d5 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -303,6 +303,14 @@ static ctl_table kern_table[] = { | |||
303 | .proc_handler = &proc_dointvec, | 303 | .proc_handler = &proc_dointvec, |
304 | }, | 304 | }, |
305 | #endif | 305 | #endif |
306 | { | ||
307 | .ctl_name = CTL_UNNUMBERED, | ||
308 | .procname = "sched_compat_yield", | ||
309 | .data = &sysctl_sched_compat_yield, | ||
310 | .maxlen = sizeof(unsigned int), | ||
311 | .mode = 0644, | ||
312 | .proc_handler = &proc_dointvec, | ||
313 | }, | ||
306 | #ifdef CONFIG_PROVE_LOCKING | 314 | #ifdef CONFIG_PROVE_LOCKING |
307 | { | 315 | { |
308 | .ctl_name = CTL_UNNUMBERED, | 316 | .ctl_name = CTL_UNNUMBERED, |