X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=kernel%2Ftime%2Ftick-sched.c;h=89aed5933ed4f23b4edef0e8ef6026dfe777dae7;hb=aa907639f1d9fe0e3274b4f6c1088542f750a539;hp=e0f59a21c06110b0dad7c0a5d031b40c9d3c660a;hpb=78efd1ddd95d2fac1ed8d5fadd9dab885ea70e55;p=~andy%2Flinux diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index e0f59a21c06..89aed5933ed 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -231,6 +231,13 @@ void tick_nohz_stop_sched_tick(int inidle) if (!inidle && !ts->inidle) goto end; + /* + * Set ts->inidle unconditionally. Even if the system did not + * switch to NOHZ mode the cpu frequency governers rely on the + * update of the idle time accounting in tick_nohz_start_idle(). + */ + ts->inidle = 1; + now = tick_nohz_start_idle(ts); /* @@ -248,8 +255,6 @@ void tick_nohz_stop_sched_tick(int inidle) if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) goto end; - ts->inidle = 1; - if (need_resched()) goto end;