mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: Dave Jones <davej@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>
Subject: Re: x86_pmu_start WARN_ON.
Date: Wed, 19 Feb 2014 11:19:49 +0100	[thread overview]
Message-ID: <20140219101949.GG15586@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1402181717300.20073@vincent-weaver-1.um.maine.edu>

On Tue, Feb 18, 2014 at 05:20:57PM -0500, Vince Weaver wrote:
> On Tue, 18 Feb 2014, Vince Weaver wrote:
> 
> > On Mon, 17 Feb 2014, Peter Zijlstra wrote:
> > 
> > > Enable CONFIG_FRAME_POINTER for better stack traces; I suspect the
> > > list_del_event() is just random stack garbage. The path that makes sense
> > > is:
> > >   wait_rcu()->__wait_for_common()->schedule_timeout()
> > 
> > Here's an updated stack trace on 3.14-rc3 with CONFIG_FRAME_POINTER 
> > enabled, in case it's helpful:
> 
> Still chasing this, although all I can add are these debug messages:
> 
> [  140.812003] PROBLEM: n_events=2 n_added=2 VMW: idx=33 state=f00 type=0 config=0 samp_per=5e6069eb0
> [  140.812003] ALL: VMW: Num=0 idx=33 state=f00 type=0 config=0 samp_per=5e6069eb0
> [  140.812003] ALL: VMW: Num=1 idx=0 state=3 type=0 config=1 samp_per=0
> 
> So when the WARN gets triggered there only only two events in the event
> list, the NMI watchdog which has already been enabled somehow (that f00
> I stuck in, pmu_start sets it to f00 instead of 00 to make sure it wasn't
> something stomping on memory) and the precise instructions event.
> 
> I still have a hard time following what all the schedule in code is doing.

Yes, I got it once, then promptly forgot it. It all became the thing it
is because AMD Fam15 had some horrible constraints.

So in general it tries to map events to counters in order of decreasing
constraints (so it starts with the most constrained events).

It all gets a bit funny due to overlapping constraints; see commit
bc1738f6ee830 for a little blurb on what the overlap thing is about.


So when we add a new event (or more) we compute a mapping from event to
counter. Then we disable all (pre existing) events that moved to a new
location, then we enable all events (insert HES_ARCH) that were running
but got relocated and the new events.

Of course the code is horrible, but I think the above is what it does.

  reply	other threads:[~2014-02-19 10:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 19:02 Dave Jones
2014-02-10 21:26 ` Vince Weaver
2014-02-11 13:29   ` Peter Zijlstra
2014-02-12 21:04     ` Vince Weaver
2014-02-13 14:11       ` Vince Weaver
2014-02-13 17:35         ` Vince Weaver
2014-02-13 22:13           ` Vince Weaver
2014-02-17 15:28             ` Peter Zijlstra
2014-02-18 18:30               ` Vince Weaver
2014-02-18 22:20                 ` Vince Weaver
2014-02-19 10:19                   ` Peter Zijlstra [this message]
2014-02-19 22:34                     ` Vince Weaver
2014-02-20 10:08                       ` Peter Zijlstra
2014-02-20 15:47                         ` Andi Kleen
2014-02-20 15:54                           ` Peter Zijlstra
2014-02-20 17:31                             ` Andi Kleen
2014-02-20 18:15                               ` Peter Zijlstra
2014-02-20 18:23                                 ` Andi Kleen
2014-02-20 19:04                                 ` Steven Rostedt
2014-02-20 16:26                         ` Steven Rostedt
2014-02-20 17:00                           ` Peter Zijlstra
2014-02-20 17:43                             ` Steven Rostedt
2014-02-20 17:46                               ` Steven Rostedt
2014-02-20 18:18                                 ` Peter Zijlstra
2014-02-20 18:03                         ` Vince Weaver
2014-02-20 18:23                           ` Peter Zijlstra
2014-02-20 18:54                             ` Vince Weaver
2014-02-20 19:21                               ` Vince Weaver
2014-02-20 19:46                                 ` Vince Weaver
2014-02-21 14:37                                   ` Vince Weaver
2014-02-21 15:03                             ` Peter Zijlstra
2014-02-21 20:18                               ` Vince Weaver
2014-02-24 11:28                                 ` Peter Zijlstra
2014-02-26  5:59                                   ` Vince Weaver
2014-02-27 13:32                               ` [tip:perf/core] perf/x86: Fix event scheduling tip-bot for Peter Zijlstra

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=20140219101949.GG15586@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=vincent.weaver@maine.edu \
    /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

Powered by JetHome