projects/linux·commit 55cd5340

sched: scale sysctl_sched_shares_ratelimit with nr_cpus

55cd5340 · Peter Zijlstra <[email protected]> · 2008-08-04 08:54:26 +02:00

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 <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Commit
55cd53404c5cc5fd94708232e3b4aa4a9388917b
Parents
f1679d08

Changes

1 files changed · +4 −2

FileStatusAddDelContent
kernel/sched.cmodified+4−2View file

kernel/sched.c

View file
diff --git a/kernel/sched.c b/kernel/sched.c
index 8bf8a55..0408071 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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