]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sched: scale sysctl_sched_shares_ratelimit with nr_cpus
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 4 Aug 2008 06:54:26 +0000 (08:54 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 15 Aug 2008 16:25:07 +0000 (18:25 +0200)
David reported that his Niagra spend a little too much time in
tg_shares_up(), which considering he has a large cpu count makes sense.

So scale the ratelimit value with the number of cpus like we do for
other controls as well.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c

index 8bf8a5528bc7fed6e8d7d942e82ee6245f1435d4..040807196b33c09bbc9fed95fe3522b78117e38d 100644 (file)
@@ -808,9 +808,9 @@ const_debug unsigned int sysctl_sched_nr_migrate = 32;
 
 /*
  * ratelimit for updating the group shares.
- * default: 0.5ms
+ * default: 0.25ms
  */
-const_debug unsigned int sysctl_sched_shares_ratelimit = 500000;
+unsigned int sysctl_sched_shares_ratelimit = 250000;
 
 /*
  * period over which we measure -rt task cpu usage in us.
@@ -5740,6 +5740,8 @@ static inline void sched_init_granularity(void)
                sysctl_sched_latency = limit;
 
        sysctl_sched_wakeup_granularity *= factor;
+
+       sysctl_sched_shares_ratelimit *= factor;
 }
 
 #ifdef CONFIG_SMP