LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] tick/sched: Drop duplicated tick_sched.inidle
Date: Thu, 23 May 2019 13:32:54 +0800	[thread overview]
Message-ID: <20190523053254.GA2517@xz-x1> (raw)
In-Reply-To: <20190522121837.GA11692@lerouge>

On Wed, May 22, 2019 at 02:18:41PM +0200, Frederic Weisbecker wrote:
> On Wed, May 22, 2019 at 11:29:06AM +0800, Peter Xu wrote:
> > It is set before entering idle and cleared when quitting idle, though
> > it seems to be a complete duplicate of tick_sched.idle_active.  We
> > should probably be able to use any one of them to replace the other.
> 
> Not exactly.
> 
> @inidle is set on idle entry and cleared on idle exit.
> @idle_active is the same but it's cleared during idle interrupts
> so that idle_sleeptime only account real idle time.
> 
> And note below:
> 
> > @@ -1017,7 +1015,7 @@ void tick_nohz_irq_exit(void)
> >  {
> >  	struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
> >  
> > -	if (ts->inidle)
> > +	if (ts->idle_active)
> >  		tick_nohz_start_idle(ts);
> 
> idle_active will always be cleared here from tick_nohz_irq_enter().
> We actually want to conditionally set it again depending on the inidle value.

You are right; I've missed the calls from irq enter/exit. Thanks, Frederic.

-- 
Peter Xu
 

      reply	other threads:[~2019-05-23  5:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22  3:29 Peter Xu
2019-05-22 12:18 ` Frederic Weisbecker
2019-05-23  5:32   ` Peter Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190523053254.GA2517@xz-x1 \
    --to=peterx@redhat.com \
    --cc=frederic@kernel.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --subject='Re: [PATCH] tick/sched: Drop duplicated tick_sched.inidle' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).