Index: linux-2.6.31-bfs/init/main.c =================================================================== --- linux-2.6.31-bfs.orig/init/main.c 2009-09-22 19:42:33.022979840 +1000 +++ linux-2.6.31-bfs/init/main.c 2009-09-22 19:55:39.484229092 +1000 @@ -876,6 +876,20 @@ static noinline int init_post(void) panic("No init found. Try passing init= option to kernel."); } +extern int rr_interval; + +static void __init set_rr_interval(void) +{ + rr_interval = 6; + + /* + * Assume that every added cpu gives us slightly less overall latency + * allowing us to increase the base rr_interval, but in a non linear + * fashion. + */ + rr_interval *= 1 + ilog2(num_online_cpus()); +} + static int __init kernel_init(void * unused) { lock_kernel(); @@ -923,6 +937,9 @@ static int __init kernel_init(void * unu prepare_namespace(); } + set_rr_interval(); + smp_mb(); + /* * Ok, we have completed the initial bootup, and * we're essentially up and running. Get rid of the Index: linux-2.6.31-bfs/kernel/sched_bfs.c =================================================================== --- linux-2.6.31-bfs.orig/kernel/sched_bfs.c 2009-09-22 19:42:33.011979958 +1000 +++ linux-2.6.31-bfs/kernel/sched_bfs.c 2009-09-22 19:55:11.169104359 +1000 @@ -136,9 +136,9 @@ static inline void sg_inc_cpu_power(stru /* * This is the time all tasks within the same priority round robin. * Value is in ms and set to a minimum of 6ms. Scales with number of cpus. - * Tunable via /proc interface. + * Tunable via /proc interface. (set to 1000 on boot, back to 6 on init) */ -int rr_interval __read_mostly = 6; +int rr_interval __read_mostly = 1000; /* * sched_iso_cpu - sysctl which determines the cpu percentage SCHED_ISO tasks @@ -5881,13 +5881,6 @@ void __init sched_init_smp(void) free_cpumask_var(non_isolated_cpus); alloc_cpumask_var(&fallback_doms, GFP_KERNEL); - - /* - * Assume that every added cpu gives us slightly less overall latency - * allowing us to increase the base rr_interval, but in a non linear - * fashion. - */ - rr_interval *= 1 + ilog2(num_online_cpus()); } #else void __init sched_init_smp(void)