Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1522771 > unrolled thread
| Started by | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| First post | 2016-11-15 15:30 +0100 |
| Last post | 2016-11-24 02:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2] drivers: cpuidle: assign enter_freeze to same as enter callback function Sudeep Holla <sudeep.holla@arm.com> - 2016-11-15 15:30 +0100
Re: [PATCH v2] drivers: cpuidle: assign enter_freeze to same as enter callback function "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-11-24 02:10 +0100
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2016-11-15 15:30 +0100 |
| Subject | Re: [PATCH v2] drivers: cpuidle: assign enter_freeze to same as enter callback function |
| Message-ID | <sDMUh-65N-27@gated-at.bofh.it> |
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 ? -- Regards, Sudeep
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-11-24 02:10 +0100 |
| Subject | Re: [PATCH v2] drivers: cpuidle: assign enter_freeze to same as enter callback function |
| Message-ID | <sGQI1-3Yw-17@gated-at.bofh.it> |
| In reply to | #1522771 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web