The patch titled time: nohz: fix ondemand governor not always ramping up on 100% load. has been added to the -mm tree. Its filename is time-nohz-fix-ondemand-governor-not-always-ramping-up-on-100%-load.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: time: nohz: fix ondemand governor not always ramping up on 100% load. From: Arve Hjonnevag <arve@xxxxxxxxxxx> On systems that perform the context switch with interrupts enabled (e.g. ARM) get_cpu_idle_time_us could get stuck returning the last idle time when the cpu is busy. If an interrupt occurs while switching to the idle thread, and this interrupt wakes up a thread, need-resched will be set on the idle thread, but since we have not finished switching to the idle thread tick_nohz_stop_sched_tick will be called. (idle_cpu is true since the head of the runqueue is the idle thread, but need_resched returns false since we are still running in the context of the old thread) Fix this by not calling tick_nohz_start_idle when returning from an interrupt while the idle thread is in its schedule phase. (!ts->inidle) Signed-off-by: Arve Hjonnevag <arve@xxxxxxxxxxx> Cc: Brian Sewtland <swetland@xxxxxxxxxx> Cc: Russell King <rmk@xxxxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/time/tick-sched.c~time-nohz-fix-ondemand-governor-not-always-ramping-up-on-100%-load kernel/time/tick-sched.c --- a/kernel/time/tick-sched.c~time-nohz-fix-ondemand-governor-not-always-ramping-up-on-100%-load +++ a/kernel/time/tick-sched.c @@ -224,7 +224,6 @@ void tick_nohz_stop_sched_tick(int inidl cpu = smp_processor_id(); ts = &per_cpu(tick_cpu_sched, cpu); - now = tick_nohz_start_idle(ts); /* * If this cpu is offline and it is the one which updates @@ -244,6 +243,7 @@ void tick_nohz_stop_sched_tick(int inidl if (!inidle && !ts->inidle) goto end; + now = tick_nohz_start_idle(ts); ts->inidle = 1; if (need_resched()) _ Patches currently in -mm which might be from arve@xxxxxxxxxxx are linux-next.patch time-nohz-fix-ondemand-governor-not-always-ramping-up-on-100%-load.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html