public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Dave Jones <davej@redhat.com>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Peter Anvin <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: Yet more softlockups.
Date: Fri, 12 Jul 2013 08:38:52 -0700	[thread overview]
Message-ID: <51E0230C.9010509@intel.com> (raw)
In-Reply-To: <20130712103117.GA14862@gmail.com>

On 07/12/2013 03:31 AM, Ingo Molnar wrote:
> * Dave Jones <davej@redhat.com> wrote:
>> On Wed, Jul 10, 2013 at 05:20:15PM +0200, Markus Trippelsdorf wrote:
>>  > On 2013.07.10 at 11:13 -0400, Dave Jones wrote:
>>  > > I get this right after booting..
>>  > > 
>>  > > [  114.516619] perf samples too long (4262 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
>>  > 
>>  > You can disable this warning by:
>>  > 
>>  > echo 0 > /proc/sys/kernel/perf_cpu_time_max_percent
>>
>> Yes, but why is this even being run when I'm not running perf ?
>>
>> The only NMI source running should be the watchdog.
> 
> The NMI watchdog is a perf event.
> 
> I've Cc:-ed Dave Hansen, the author of those changes - is this a false 
> positive or some real problem?

The warning comes from calling perf_sample_event_took(), which is only
called from one place: perf_event_nmi_handler().

So we can be pretty sure that the perf NMI is firing, or at least that
this handler code is running.

nmi_handle() says:
        /*
         * NMIs are edge-triggered, which means if you have enough
         * of them concurrently, you can lose some because only one
         * can be latched at any given time.  Walk the whole list
         * to handle those situations.
         */

perf_event_nmi_handler() probably gets _called_ when the watchdog NMI
goes off.  But, it should hit this check:

        if (!atomic_read(&active_events))
                return NMI_DONE;

and return quickly. This is before it has a chance to call
perf_sample_event_took().

Dave, for your case, my suspicion would be that it got turned on
inadvertently, or that we somehow have a bug which bumped up
perf_event.c's 'active_events' and we're running some perf code that we
don't have to.

But, I'm suspicious.  I was having all kinds of issues with perf and
NMIs taking hundreds of milliseconds.  I never isolated it to having a
real, single, cause.  I attributed it to my large NUMA system just being
slow.  Your description makes me wonder what I missed, though.

  reply	other threads:[~2013-07-12 15:39 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04  1:55 scheduling while atomic & hang Dave Jones
2013-07-04  2:49 ` Linus Torvalds
2013-07-04  4:43   ` H. Peter Anvin
2013-07-04  7:49   ` Dave Jones
2013-07-04 17:22     ` Linus Torvalds
2013-07-10 20:54     ` J. Bruce Fields
2013-07-04 18:08   ` H. Peter Anvin
2013-07-05  6:51     ` Ingo Molnar
2013-07-05  7:19       ` Frederic Weisbecker
2013-07-05 10:05         ` Ingo Molnar
2013-07-05 19:27       ` Linus Torvalds
2013-07-06  8:02         ` Frederic Weisbecker
2013-07-06  8:07           ` Ingo Molnar
2013-07-05 14:38   ` Yet more softlockups Dave Jones
2013-07-05 15:15     ` Thomas Gleixner
2013-07-05 16:00       ` Dave Jones
2013-07-05 16:02         ` Thomas Gleixner
2013-07-05 16:41           ` H. Peter Anvin
2013-07-05 18:20             ` Seiji Aguchi
2013-07-05 22:21               ` Thomas Gleixner
2013-07-06  7:24         ` Ingo Molnar
2013-07-07  0:24           ` Dave Jones
2013-07-10 15:13           ` Dave Jones
2013-07-10 15:20             ` Markus Trippelsdorf
2013-07-10 15:40               ` Dave Jones
2013-07-12 10:31                 ` Ingo Molnar
2013-07-12 15:38                   ` Dave Hansen [this message]
2013-07-12 15:45                     ` Dave Jones
2013-07-12 15:55                       ` Dave Hansen
2013-07-12 17:00                         ` Dave Jones
2013-07-12 17:12                       ` David Ahern
2013-07-12 17:18                         ` Dave Jones
2013-07-12 17:40                           ` David Ahern
2013-07-12 17:50                             ` Dave Jones
2013-07-12 18:07                               ` David Ahern
2013-07-12 18:22                                 ` Dave Hansen
2013-07-12 20:13                                 ` Dave Hansen
2013-07-13  1:40                       ` Vince Weaver
2013-07-10 15:39             ` Vince Weaver
2013-07-10 15:45               ` Dave Jones
2013-07-10 21:54               ` Dave Jones

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=51E0230C.9010509@intel.com \
    --to=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=davej@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus@trippelsdorf.de \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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