Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363050 > unrolled thread
| Started by | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| First post | 2016-03-22 23:30 +0100 |
| Last post | 2016-03-23 09:00 +0100 |
| Articles | 4 — 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 v3 4/4] nmi_backtrace: generate one-line reports for idle cpus "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-22 23:30 +0100
Re: [PATCH v3 4/4] nmi_backtrace: generate one-line reports for idle cpus Peter Zijlstra <peterz@infradead.org> - 2016-03-22 23:50 +0100
Re: [PATCH v3 4/4] nmi_backtrace: generate one-line reports for idle cpus "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-23 01:50 +0100
Re: [PATCH v3 4/4] nmi_backtrace: generate one-line reports for idle cpus Peter Zijlstra <peterz@infradead.org> - 2016-03-23 09:00 +0100
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-03-22 23:30 +0100 |
| Subject | Re: [PATCH v3 4/4] nmi_backtrace: generate one-line reports for idle cpus |
| Message-ID | <rfCYh-2xh-9@gated-at.bofh.it> |
On Tuesday, March 22, 2016 01:19:39 PM Chris Metcalf wrote:
> When doing an nmi backtrace of many cores, most of which are idle,
> the output is a little overwhelming and very uninformative. Suppress
> messages for cpus that are idling when they are interrupted and just
> emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN".
>
> We do this by grouping all the cpuidle code together into a new
> .cpuidle.text section, and then checking the address of the
> interrupted PC to see if it lies within that section.
>
> This commit suitably tags x86, arm64, and tile idle routines,
> and only adds in the minimal framework for other architectures.
>
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
> ---
[cut]
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index cd4510a63375..924554f920fb 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -725,8 +725,8 @@ static struct cpuidle_state avn_cstates[] = {
> *
> * Must be called under local_irq_disable().
> */
> -static int intel_idle(struct cpuidle_device *dev,
> - struct cpuidle_driver *drv, int index)
> +static __cpuidle int intel_idle(struct cpuidle_device *dev,
> + struct cpuidle_driver *drv, int index)
> {
> unsigned long ecx = 1; /* break on interrupt flag */
> struct cpuidle_state *state = &drv->states[index];
Well, what about intel_idle_freeze()? Or do we not care?
And analogous stuff in processor_idle.c for that matter?
acpi_idle_enter()/acpi_idle_enter_freeze() plus stuff called by those?
Thanks,
Rafael
[toc] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-03-22 23:50 +0100 |
| Subject | Re: [PATCH v3 4/4] nmi_backtrace: generate one-line reports for idle cpus |
| Message-ID | <rfDhE-2E4-21@gated-at.bofh.it> |
| In reply to | #1363050 |
On Tue, Mar 22, 2016 at 11:31:11PM +0100, Rafael J. Wysocki wrote:
> > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> > index cd4510a63375..924554f920fb 100644
> > --- a/drivers/idle/intel_idle.c
> > +++ b/drivers/idle/intel_idle.c
> > @@ -725,8 +725,8 @@ static struct cpuidle_state avn_cstates[] = {
> > *
> > * Must be called under local_irq_disable().
> > */
> > -static int intel_idle(struct cpuidle_device *dev,
> > - struct cpuidle_driver *drv, int index)
> > +static __cpuidle int intel_idle(struct cpuidle_device *dev,
> > + struct cpuidle_driver *drv, int index)
> > {
> > unsigned long ecx = 1; /* break on interrupt flag */
> > struct cpuidle_state *state = &drv->states[index];
>
> Well, what about intel_idle_freeze()? Or do we not care?
I argued against it; when you're suspended the NMI watchdog is stopped
too. Then again, you've more experience debugging that thing, so if
you think its useful its not much effort adding it.
> And analogous stuff in processor_idle.c for that matter?
>
> acpi_idle_enter()/acpi_idle_enter_freeze() plus stuff called by those?
Ah, I only tagged acpi_processor_ffh_cstate_enter() because I went from
mwait_idle_with_hints(), I suppose acpi_safe_halt() and
acpi_idle_do_entry() itself for the INB method should cover it?
(This being one of the reasons I asked Chris to Cc you; you know this
stuff far better than I do)
---
drivers/acpi/processor_idle.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 175c86bee3a9..d5b11fff9e88 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -111,7 +111,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = {
* Callers should disable interrupts before the call and enable
* interrupts after return.
*/
-static void acpi_safe_halt(void)
+__cpuidle static void acpi_safe_halt(void)
{
if (!tif_need_resched()) {
safe_halt();
@@ -680,7 +680,7 @@ static int acpi_idle_bm_check(void)
*
* Caller disables interrupt before call and enables interrupt after return.
*/
-static void acpi_idle_do_entry(struct acpi_processor_cx *cx)
+__cpuidle static void acpi_idle_do_entry(struct acpi_processor_cx *cx)
{
if (cx->entry_method == ACPI_CSTATE_FFH) {
/* Call into architectural FFH based C-state */
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-03-23 01:50 +0100 |
| Message-ID | <rfF9M-3SF-5@gated-at.bofh.it> |
| In reply to | #1363065 |
On Tuesday, March 22, 2016 11:45:57 PM Peter Zijlstra wrote:
> On Tue, Mar 22, 2016 at 11:31:11PM +0100, Rafael J. Wysocki wrote:
>
> > > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> > > index cd4510a63375..924554f920fb 100644
> > > --- a/drivers/idle/intel_idle.c
> > > +++ b/drivers/idle/intel_idle.c
> > > @@ -725,8 +725,8 @@ static struct cpuidle_state avn_cstates[] = {
> > > *
> > > * Must be called under local_irq_disable().
> > > */
> > > -static int intel_idle(struct cpuidle_device *dev,
> > > - struct cpuidle_driver *drv, int index)
> > > +static __cpuidle int intel_idle(struct cpuidle_device *dev,
> > > + struct cpuidle_driver *drv, int index)
> > > {
> > > unsigned long ecx = 1; /* break on interrupt flag */
> > > struct cpuidle_state *state = &drv->states[index];
> >
> > Well, what about intel_idle_freeze()? Or do we not care?
>
> I argued against it; when you're suspended the NMI watchdog is stopped
> too.
Is it also stopped for suspend-to-idle? I'm not sure about that.
Where do I need to look to find out?
> Then again, you've more experience debugging that thing, so if
> you think its useful its not much effort adding it.
>
> > And analogous stuff in processor_idle.c for that matter?
> >
> > acpi_idle_enter()/acpi_idle_enter_freeze() plus stuff called by those?
>
> Ah, I only tagged acpi_processor_ffh_cstate_enter() because I went from
> mwait_idle_with_hints(), I suppose acpi_safe_halt() and
> acpi_idle_do_entry() itself for the INB method should cover it?
Yes, these two should be sufficient.
> (This being one of the reasons I asked Chris to Cc you; you know this
> stuff far better than I do)
>
> ---
> drivers/acpi/processor_idle.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index 175c86bee3a9..d5b11fff9e88 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -111,7 +111,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = {
> * Callers should disable interrupts before the call and enable
> * interrupts after return.
> */
> -static void acpi_safe_halt(void)
> +__cpuidle static void acpi_safe_halt(void)
> {
> if (!tif_need_resched()) {
> safe_halt();
> @@ -680,7 +680,7 @@ static int acpi_idle_bm_check(void)
> *
> * Caller disables interrupt before call and enables interrupt after return.
> */
> -static void acpi_idle_do_entry(struct acpi_processor_cx *cx)
> +__cpuidle static void acpi_idle_do_entry(struct acpi_processor_cx *cx)
> {
> if (cx->entry_method == ACPI_CSTATE_FFH) {
> /* Call into architectural FFH based C-state */
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-03-23 09:00 +0100 |
| Subject | Re: [PATCH v3 4/4] nmi_backtrace: generate one-line reports for idle cpus |
| Message-ID | <rfLRV-g1-9@gated-at.bofh.it> |
| In reply to | #1363143 |
On Wed, Mar 23, 2016 at 01:50:00AM +0100, Rafael J. Wysocki wrote: > > > Well, what about intel_idle_freeze()? Or do we not care? > > > > I argued against it; when you're suspended the NMI watchdog is stopped > > too. > > Is it also stopped for suspend-to-idle? I'm not sure about that. > > Where do I need to look to find out? Hmm I have memories of writing a patch to that effect when we were starting with that suspend-to-idle stuff, because people didn't like being woken up all the time. But now that I look I cannot find it either..
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web