summaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorLinus Torvalds2009-06-20 19:51:44 +0200
committerLinus Torvalds2009-06-20 19:51:44 +0200
commit38df92b8cee936334f686c06df0e5fbb92e252df (patch)
treeffdfd4e5e746300f38a1267b207b293710b3c9a9 /kernel/time
parentMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kern... (diff)
parentNOHZ: Properly feed cpufreq ondemand governor (diff)
downloadkernel-qcow2-linux-38df92b8cee936334f686c06df0e5fbb92e252df.tar.gz
kernel-qcow2-linux-38df92b8cee936334f686c06df0e5fbb92e252df.tar.xz
kernel-qcow2-linux-38df92b8cee936334f686c06df0e5fbb92e252df.zip
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: NOHZ: Properly feed cpufreq ondemand governor
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/tick-sched.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 2aff39c6f10c..e0f59a21c061 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -222,6 +222,15 @@ void tick_nohz_stop_sched_tick(int inidle)
cpu = smp_processor_id();
ts = &per_cpu(tick_cpu_sched, cpu);
+
+ /*
+ * Call to tick_nohz_start_idle stops the last_update_time from being
+ * updated. Thus, it must not be called in the event we are called from
+ * irq_exit() with the prior state different than idle.
+ */
+ if (!inidle && !ts->inidle)
+ goto end;
+
now = tick_nohz_start_idle(ts);
/*
@@ -239,9 +248,6 @@ void tick_nohz_stop_sched_tick(int inidle)
if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))
goto end;
- if (!inidle && !ts->inidle)
- goto end;
-
ts->inidle = 1;
if (need_resched())