lkml.org 
[lkml]   [2011]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/32 RESEND] nohz: Drop useless ts->inidle check before rearming the tick
On Mon, Aug 29, 2011 at 04:23:15PM +0200, Peter Zijlstra wrote:
> On Mon, 2011-08-15 at 17:52 +0200, Frederic Weisbecker wrote:
> > We only need to check if we have ts->stopped to ensure the tick
> > was stopped and we want to re-enable it. Checking ts->inidle
> > there is useless.
>
> /me goes la-la-la-la...
>
> It would so help poor little me who hasn't stared at this code in detail
> for the past several days and is thus horridly confused if you'd expand
> your reasoning somewhat.

Sorry, I'm no big fan of writing changelogs and sometimes the lack
it's unfortunately visible :)$

It needs to be refactored due to the previous patch beeing broken.
But the rationale, indeed missing here, is that if you have ts->stopped
then you have ts->inidle. Once you entered tick_nohz_stop_sched_tick()
you have ts->inidle set and only once you reached that step the tick
can be stopped, so the following check:

if (!ts->inidle || !ts->tick_stopped)

can be summed up with:

if (!ts->tick_stopped) {



\
 
 \ /
  Last update: 2011-08-29 19:01    [W:0.089 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site