On Tue, 2014-06-24 at 12:02 +0800, Rui Xiang wrote: > Hi Greg or Thomas, > > 0e576acbc1d9600cf2d9b4a141a2554639959d50 > nohz: Fix another inconsistency between CONFIG_NO_HZ=n and nohz=off > > This fixed an inconsistency about nohz. > > Without this patch, When we boot with nohz=off and CONFIG_NO_HZ=Y, > and the system is idle, powertop shows the cpu is always in polling > state. It can affect the performance in some cases. [...] > This patch looks applicable to stable-3.4 and stable 3.10. It can be > applyed to 3.10 cleanly, but should be added some adjustment for 3.4. > > And what do you think? I've queued this up for 3.2, with adjusted context: [...] > --- a/kernel/time/tick-sched.c > +++ b/kernel/time/tick-sched.c > @@ -296,8 +296,10 @@ static void tick_nohz_stop_sched_tick(struct tick_sched *ts) > tick_do_timer_cpu = TICK_DO_TIMER_NONE; > } > > - if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) > + if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) { > + ts->sleep_length = (ktime_t) { .tv64 = NSEC_PER_SEC/HZ }; > return; Here there is a 'goto end' rather than 'return'. > + } > > if (need_resched()) > return; And here too. Ben. -- Ben Hutchings Kids! Bringing about Armageddon can be dangerous. Do not attempt it in your own home. - Terry Pratchett and Neil Gaiman, `Good Omens'
Attachment:
signature.asc
Description: This is a digitally signed message part