Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Peter Zijlstra
On Mon, Mar 07, 2016 at 12:38:16PM -0500, Chris Metcalf wrote: > On 03/07/2016 04:48 AM, Peter Zijlstra wrote: > I'm a little skeptical that a single percpu write is going to add much > measurable overhead to this path. So that write is almost guaranteed to be a cacheline miss, those things hurt

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Peter Zijlstra
On Mon, Mar 07, 2016 at 12:38:16PM -0500, Chris Metcalf wrote: > On 03/07/2016 04:48 AM, Peter Zijlstra wrote: > I'm a little skeptical that a single percpu write is going to add much > measurable overhead to this path. So that write is almost guaranteed to be a cacheline miss, those things hurt

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Chris Metcalf
On 03/07/2016 04:48 AM, Peter Zijlstra wrote: On Tue, Mar 01, 2016 at 11:01:42AM -0500, Chris Metcalf wrote: +++ b/kernel/sched/idle.c @@ -52,15 +52,25 @@ static int __init cpu_idle_nopoll_setup(char *__unused) __setup("hlt", cpu_idle_nopoll_setup); #endif +static DEFINE_PER_CPU(bool,

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Chris Metcalf
On 03/07/2016 04:48 AM, Peter Zijlstra wrote: On Tue, Mar 01, 2016 at 11:01:42AM -0500, Chris Metcalf wrote: +++ b/kernel/sched/idle.c @@ -52,15 +52,25 @@ static int __init cpu_idle_nopoll_setup(char *__unused) __setup("hlt", cpu_idle_nopoll_setup); #endif +static DEFINE_PER_CPU(bool,

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Chris Metcalf
On 03/07/2016 03:26 AM, Daniel Thompson wrote: Chris Metcalf wrote: +static DEFINE_PER_CPU(bool, cpu_idling); + +/* Was the cpu was in the low-level idle code when interrupted? */ +bool in_cpu_idle(void) +{ +return this_cpu_read(cpu_idling); I think we continue to need the code to identify

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Chris Metcalf
On 03/07/2016 03:26 AM, Daniel Thompson wrote: Chris Metcalf wrote: +static DEFINE_PER_CPU(bool, cpu_idling); + +/* Was the cpu was in the low-level idle code when interrupted? */ +bool in_cpu_idle(void) +{ +return this_cpu_read(cpu_idling); I think we continue to need the code to identify

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Peter Zijlstra
On Tue, Mar 01, 2016 at 11:01:42AM -0500, Chris Metcalf wrote: > +++ b/kernel/sched/idle.c > @@ -52,15 +52,25 @@ static int __init cpu_idle_nopoll_setup(char *__unused) > __setup("hlt", cpu_idle_nopoll_setup); > #endif > +static DEFINE_PER_CPU(bool, cpu_idling); > + > +/* Was the cpu was in the

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Peter Zijlstra
On Tue, Mar 01, 2016 at 11:01:42AM -0500, Chris Metcalf wrote: > +++ b/kernel/sched/idle.c > @@ -52,15 +52,25 @@ static int __init cpu_idle_nopoll_setup(char *__unused) > __setup("hlt", cpu_idle_nopoll_setup); > #endif > +static DEFINE_PER_CPU(bool, cpu_idling); > + > +/* Was the cpu was in the

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Daniel Thompson
On 01/03/16 23:01, Chris Metcalf wrote: (+PeterZ, Rafael, and Daniel Lezcano for cpuidle and scheduler) On 03/01/2016 09:23 AM, Daniel Thompson wrote: On 29/02/16 21:40, Chris Metcalf wrote: When doing an nmi backtrace of many cores, and most of them are idle, the output is a little

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-07 Thread Daniel Thompson
On 01/03/16 23:01, Chris Metcalf wrote: (+PeterZ, Rafael, and Daniel Lezcano for cpuidle and scheduler) On 03/01/2016 09:23 AM, Daniel Thompson wrote: On 29/02/16 21:40, Chris Metcalf wrote: When doing an nmi backtrace of many cores, and most of them are idle, the output is a little

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-01 Thread Chris Metcalf
(+PeterZ, Rafael, and Daniel Lezcano for cpuidle and scheduler) On 03/01/2016 09:23 AM, Daniel Thompson wrote: On 29/02/16 21:40, Chris Metcalf wrote: When doing an nmi backtrace of many cores, and most of them are idle, the output is a little overwhelming and very uninformative. Suppress

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-01 Thread Chris Metcalf
(+PeterZ, Rafael, and Daniel Lezcano for cpuidle and scheduler) On 03/01/2016 09:23 AM, Daniel Thompson wrote: On 29/02/16 21:40, Chris Metcalf wrote: When doing an nmi backtrace of many cores, and most of them are idle, the output is a little overwhelming and very uninformative. Suppress

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-01 Thread Daniel Thompson
On 29/02/16 21:40, Chris Metcalf wrote: When doing an nmi backtrace of many cores, and most of them 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:

Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-03-01 Thread Daniel Thompson
On 29/02/16 21:40, Chris Metcalf wrote: When doing an nmi backtrace of many cores, and most of them 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:

[PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-02-29 Thread Chris Metcalf
When doing an nmi backtrace of many cores, and most of them 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: idle". Signed-off-by: Chris Metcalf

[PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus

2016-02-29 Thread Chris Metcalf
When doing an nmi backtrace of many cores, and most of them 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: idle". Signed-off-by: Chris Metcalf ---