diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-09-19 23:34:46 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-09-19 23:34:46 +0200 |
commit | 1799e35d5baab6e06168b46cc78b968e728ea3d1 (patch) | |
tree | cccf64a62fa9106aa18253371b675925c0582bab /kernel/sysctl.c | |
parent | a88a8eff1e6e32d3288986a9d36c6a449c032d3a (diff) | |
download | linux-1799e35d5baab6e06168b46cc78b968e728ea3d1.tar.gz linux-1799e35d5baab6e06168b46cc78b968e728ea3d1.tar.bz2 linux-1799e35d5baab6e06168b46cc78b968e728ea3d1.zip |
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[] = { .proc_handler = &proc_dointvec, }, #endif + { + .ctl_name = CTL_UNNUMBERED, + .procname = "sched_compat_yield", + .data = &sysctl_sched_compat_yield, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, #ifdef CONFIG_PROVE_LOCKING { .ctl_name = CTL_UNNUMBERED, |