提交 f2e21c96 编写于 作者: E Eero Nurkkala 提交者: Thomas Gleixner

NOHZ: Properly feed cpufreq ondemand governor

A call from irq_exit() may occasionally pause the timing
info for cpufreq ondemand governor. This results in the
cpufreq ondemand governor to fail to calculate the 
system load properly. Thus, relocate the checks for this
particular case to keep the governor always functional.
Signed-off-by: NEero Nurkkala <ext-eero.nurkkala@nokia.com>
Reported-by: NTero Kristo <tero.kristo@nokia.com>
Acked-by: NRik van Riel <riel@redhat.com>
Acked-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 cd86a536
...@@ -222,6 +222,15 @@ void tick_nohz_stop_sched_tick(int inidle) ...@@ -222,6 +222,15 @@ void tick_nohz_stop_sched_tick(int inidle)
cpu = smp_processor_id(); cpu = smp_processor_id();
ts = &per_cpu(tick_cpu_sched, cpu); 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); now = tick_nohz_start_idle(ts);
/* /*
...@@ -239,9 +248,6 @@ void tick_nohz_stop_sched_tick(int inidle) ...@@ -239,9 +248,6 @@ void tick_nohz_stop_sched_tick(int inidle)
if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))
goto end; goto end;
if (!inidle && !ts->inidle)
goto end;
ts->inidle = 1; ts->inidle = 1;
if (need_resched()) if (need_resched())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册