diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-07-09 09:12:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-07-17 06:05:44 -0400 |
commit | 396e894d289d69bacf5acd983c97cd6e21a14c08 (patch) | |
tree | ec3e3ba19e332a799e1229f62663625d9c7583dd /kernel | |
parent | f469461df6ff822f71b8737bda86eea20f16ff93 (diff) |
sched: Revert nohz_ratelimit() for now
Norbert reported that nohz_ratelimit() causes his laptop to burn about
4W (40%) extra. For now back out the change and see if we can adjust
the power management code to make better decisions.
Reported-by: Norbert Preining <preining@logic.at>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Mike Galbraith <efault@gmx.de>
Cc: Arjan van de Ven <arjan@infradead.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 10 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 2 |
2 files changed, 1 insertions, 11 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index f52a8801b7a2..63b4a14682fa 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1232,16 +1232,6 @@ void wake_up_idle_cpu(int cpu) | |||
1232 | smp_send_reschedule(cpu); | 1232 | smp_send_reschedule(cpu); |
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | int nohz_ratelimit(int cpu) | ||
1236 | { | ||
1237 | struct rq *rq = cpu_rq(cpu); | ||
1238 | u64 diff = rq->clock - rq->nohz_stamp; | ||
1239 | |||
1240 | rq->nohz_stamp = rq->clock; | ||
1241 | |||
1242 | return diff < (NSEC_PER_SEC / HZ) >> 1; | ||
1243 | } | ||
1244 | |||
1245 | #endif /* CONFIG_NO_HZ */ | 1235 | #endif /* CONFIG_NO_HZ */ |
1246 | 1236 | ||
1247 | static u64 sched_avg_period(void) | 1237 | static u64 sched_avg_period(void) |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 813993b5fb61..f898af608171 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -325,7 +325,7 @@ void tick_nohz_stop_sched_tick(int inidle) | |||
325 | } while (read_seqretry(&xtime_lock, seq)); | 325 | } while (read_seqretry(&xtime_lock, seq)); |
326 | 326 | ||
327 | if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) || | 327 | if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) || |
328 | arch_needs_cpu(cpu) || nohz_ratelimit(cpu)) { | 328 | arch_needs_cpu(cpu)) { |
329 | next_jiffies = last_jiffies + 1; | 329 | next_jiffies = last_jiffies + 1; |
330 | delta_jiffies = 1; | 330 | delta_jiffies = 1; |
331 | } else { | 331 | } else { |