Skip to content

Commit

Permalink
sched: scale sysctl_sched_shares_ratelimit with nr_cpus
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Aug 15, 2008
1 parent f1679d0 commit 55cd534
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 55cd534

Please sign in to comment.