mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chen Yu <yu.c.chen@intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Len Brown <lenb@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Ingo Molnar <mingo@kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rui Zhang <rui.zhang@intel.com>
Subject: Re: [PATCH][v2] PM / s2idle: Clear _TIF_POLLING_NRFLAG before suspend to idle
Date: Tue, 23 Jun 2020 09:56:28 +0800	[thread overview]
Message-ID: <20200623015628.GA28671@chenyu-office.sh.intel.com> (raw)
In-Reply-To: <CAJZ5v0grJZyOX7fFx_nNjtOLT1NGyu1L10H3TY+e0HR3+T8JZA@mail.gmail.com>

On Mon, Jun 22, 2020 at 09:45:35PM +0200, Rafael J. Wysocki wrote:
> On Mon, Jun 22, 2020 at 7:16 PM Chen Yu <yu.c.chen@intel.com> wrote:
> >
> > Hi Rafael,
> > On Mon, Jun 22, 2020 at 06:19:35PM +0200, Rafael J. Wysocki wrote:
> > [cut]
> > > > +{
> > > > +       if (!current_clr_polling_and_test())
> > > > +               s2idle_enter(drv, dev, index);
> > > > +
> > > > +       return index;
> > >
> > > Is the value returned here used at all?
> > >
> > It is not used for now IMO.
> > > >          */
> > > >         index = find_deepest_state(drv, dev, U64_MAX, 0, true);
> > > >         if (index > 0)
> > > > -               enter_s2idle_proper(drv, dev, index);
> > > > +               call_s2idle(drv, dev, index);
> > >
> > > I'm wondering why this can't be
> > >
> > >     if (index > 0 && !current_clr_polling_and_test())
> > >             enter_s2idle_proper(drv, dev, index);
> > >
> > Yes, it should be simpler, but I guess Peter was trying to
> > make call_s2idle() consistent with call_cpuidle(),
> > and also s2idle_enter() is analogous to cpuidle_enter().
> 
> So IMO it would be better to do the simplest fix first and then do the
> cleanup on top of it.
>
Okay, I'll do that.

Thanks,
Chenyu

  reply	other threads:[~2020-06-23  1:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16  4:04 Chen Yu
2020-06-22 16:19 ` Rafael J. Wysocki
2020-06-22 17:18   ` Chen Yu
2020-06-22 19:45     ` Rafael J. Wysocki
2020-06-23  1:56       ` Chen Yu [this message]
2020-06-22 17:29   ` Peter Zijlstra

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=20200623015628.GA28671@chenyu-office.sh.intel.com \
    --to=yu.c.chen@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®