mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Andy Gross <andy.gross@linaro.org>,
	Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH v2] drivers: cpuidle: assign enter_freeze to same as enter callback function
Date: Thu, 24 Nov 2016 02:15:41 +0100	[thread overview]
Message-ID: <27933980.8pxBHcNLmE@vostro.rjw.lan> (raw)
In-Reply-To: <e79767a7-03be-2073-b78e-3ec8d29d5f8a@arm.com>

On Tuesday, November 15, 2016 02:20:21 PM Sudeep Holla wrote:
> Hi Rafael,
> 
> On 10/11/16 14:24, Sudeep Holla wrote:
> > enter_freeze() callback is expected atleast to do the same as enter()
> > but it has to guarantee that interrupts aren't enabled at any point
> > in its execution, as the tick is frozen.
> >
> > CPUs execute ->enter_freeze with the local tick or entire timekeeping
> > suspended, so it must not re-enable interrupts at any point (even
> > temporarily) or attempt to change states of clock event devices.
> >
> > It will be called when the system goes to suspend-to-idle and will
> > reduce power usage because CPUs won't be awaken for unnecessary IRQs
> > (i.e. woken up only on IRQs from "wakeup sources")
> >
> > We can reuse the same code for both the enter() and enter_freeze()
> > callbacks as along as they don't re-enable interrupts. Only "coupled"
> > cpuidle mechanism enables interrupts and doing that with timekeeping
> > suspended is generally not safe.
> >
> > Since this generic DT based idle driver doesn't support "coupled"
> > states, it is safe to assume that the interrupts are not re-enabled.
> >
> > This patch assign enter_freeze to same as enter callback function which
> > helps to save power without any intermittent spurious wakeups from
> > suspend-to-idle.
> >
> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > ---
> >  drivers/cpuidle/dt_idle_states.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > v1->v2:
> > 	- Dropped checking and using only states with CPUIDLE_FLAG_TIMER_STOP
> > 	  enabled.
> >
> 
> Can you pick up this patch directly if there are no concerns ?

There were none, so it's been queued up for 4.10.

Thanks,
Rafael

      reply	other threads:[~2016-11-24  1:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 17:43 [PATCH] " Sudeep Holla
2016-11-09 18:39 ` Lorenzo Pieralisi
2016-11-09 18:48   ` Sudeep Holla
2016-11-10 10:28     ` Vincent Guittot
2016-11-10 10:34       ` Sudeep Holla
2016-11-10 14:24 ` [PATCH v2] " Sudeep Holla
2016-11-10 18:18   ` Andy Gross
2016-11-15 14:20   ` Sudeep Holla
2016-11-24  1:15     ` Rafael J. Wysocki [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=27933980.8pxBHcNLmE@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=andy.gross@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=vincent.guittot@linaro.org \
    /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®