]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
sched: Revert nohz_ratelimit() for now
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 9 Jul 2010 13:12:27 +0000 (15:12 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 17 Jul 2010 10:05:44 +0000 (12:05 +0200)
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>
include/linux/sched.h
kernel/sched.c
kernel/time/tick-sched.c

index 747fcaedddb70d6cb0a49b43c0d2f2a6f23a693f..6e0bb86de9905b63dd7139bd438f292e3d5ef60c 100644 (file)
@@ -273,17 +273,11 @@ extern cpumask_var_t nohz_cpu_mask;
 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
 extern int select_nohz_load_balancer(int cpu);
 extern int get_nohz_load_balancer(void);
-extern int nohz_ratelimit(int cpu);
 #else
 static inline int select_nohz_load_balancer(int cpu)
 {
        return 0;
 }
-
-static inline int nohz_ratelimit(int cpu)
-{
-       return 0;
-}
 #endif
 
 /*
index f52a8801b7a285fb252ecc6935b55f525813881b..63b4a14682faa3193830ec4dfc0ba26c9bada4d0 100644 (file)
@@ -1232,16 +1232,6 @@ void wake_up_idle_cpu(int cpu)
                smp_send_reschedule(cpu);
 }
 
-int nohz_ratelimit(int cpu)
-{
-       struct rq *rq = cpu_rq(cpu);
-       u64 diff = rq->clock - rq->nohz_stamp;
-
-       rq->nohz_stamp = rq->clock;
-
-       return diff < (NSEC_PER_SEC / HZ) >> 1;
-}
-
 #endif /* CONFIG_NO_HZ */
 
 static u64 sched_avg_period(void)
index 813993b5fb61048f24f876a7247e4f8ac2c861a2..f898af60817156507f700abf095653352ab3f431 100644 (file)
@@ -325,7 +325,7 @@ void tick_nohz_stop_sched_tick(int inidle)
        } while (read_seqretry(&xtime_lock, seq));
 
        if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) ||
-           arch_needs_cpu(cpu) || nohz_ratelimit(cpu)) {
+           arch_needs_cpu(cpu)) {
                next_jiffies = last_jiffies + 1;
                delta_jiffies = 1;
        } else {