Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463520

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

From Petr Mladek <pmladek@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH v7 4/4] nmi_backtrace: generate one-line reports for idle cpus
Date 2016-08-16 10:10 +0200
Message-ID <s6HBD-ym-11@gated-at.bofh.it> (permalink)
References (1 earlier) <s3VhM-3zC-35@gated-at.bofh.it> <s4eDM-7BJ-35@gated-at.bofh.it> <s505H-5ym-23@gated-at.bofh.it> <s505H-5ym-21@gated-at.bofh.it> <s6HBD-ym-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 2016-08-15 12:41:54, Chris Metcalf wrote:
> On 8/11/2016 11:25 AM, Petr Mladek wrote:
> >On Mon 2016-08-08 12:03:38, 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".
> >Hmm, the problem is that native_safe_halt() is called from default_idle()
> >here. The function is marked as inline but the compiler did not inline
> >it.
> >
> >It helped me to put native_safe_halt() into the __cpuidle_text section:
> 
> Following Peter Z's suggestion, I have added an __always_inline marker
> to native_safe_halt.  For consistency, I also did arch_safe_halt(), since that
> invokes native_safe_halt, and then also native_halt() and halt(), so that
> we're not being weirdly inconsistent with markings for halt inlines.
> 
> There are also the native_irq_enable(), etc., accessors in that same header
> that are still only marked "inline" not "always_inline", but I wanted to stop
> before I was touching too much unrelated code.

Sounds fine.

> >I wonder if it would be possible to detect the idle thread an other
> >way. For example, I wonder if it would be enough to check for the
> >PID 0.
> 
> No, the problem is that pid 0 can also go off and run "interesting" code
> for things like power management, etc., so we really just want to
> focus on being quite sure that the running code isn't interesting before
> we suppress the backtrace information.
> 
> See the thread around here:
> 
> https://lkml.kernel.org/r/20160307204317.GR6344@twins.programming.kicks-ass.net

Makes sense. Thanks for the poitner.

Best Regards,
Petr

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v7 4/4] nmi_backtrace: generate one-line reports for idle  cpus Petr Mladek <pmladek@suse.com> - 2016-08-11 17:30 +0200
  Re: [PATCH v7 4/4] nmi_backtrace: generate one-line reports for idle  cpus Peter Zijlstra <peterz@infradead.org> - 2016-08-11 17:40 +0200
  Re: [PATCH v7 4/4] nmi_backtrace: generate one-line reports for idle  cpus Petr Mladek <pmladek@suse.com> - 2016-08-16 10:10 +0200

csiph-web