public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kan.liang@linux.intel.com, mingo@redhat.com, acme@kernel.org,
	linux-kernel@vger.kernel.org, eranian@google.com
Subject: Re: [RESEND PATCH V3] perf/x86: Consider pinned events for group validation
Date: Fri, 17 Jan 2020 08:22:36 -0800	[thread overview]
Message-ID: <20200117162236.GJ302770@tassilo.jf.intel.com> (raw)
In-Reply-To: <20200117091341.GX2827@hirez.programming.kicks-ass.net>

> So I still completely hate this, because it makes the counter scheduling
> more eratic.
> 
> It changes a situation where we only have false-positives (we allow
> scheduling a group that might not ever get to run) into a situation
> where we can have both false-positives and false-negatives.
> 
> Imagine the pinned event is for a currently running task; and that task
> only runs sporadically. Then you can sometimes not create the group, but
> mostly it'll work.

Right now we have real situations which always fail because of this.

> 
> Yes, this is all very annoying, but I really don't see how this makes
> anything any better.

The problem this is trying to solve is that some -M metrics fail
systematically with the NMI watchdog on. Metrics use weak groups
to avoid needing to have the full knowledge how events
can be scheduled in the user tools.  So they ely on weak groups working.

Some of the JSON metrics have groups which always validate, but never
schedule with the NMI watchdog on.

If you have a better proposal to solve this problem please share
it.

I suppose we could use export at least the number of available counters
in sysfs and then split the groups in the user tools (and assume
that's good enough and full counter constraints are not needed) 
I have some older patches to export the number at least. But fixing the
group validation seems better.

-Andi

      reply	other threads:[~2020-01-17 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 19:00 [RESEND PATCH V3] perf/x86: Consider pinned events for group validation kan.liang
2020-01-17  8:58 ` Peter Zijlstra
2020-01-17  9:13 ` Peter Zijlstra
2020-01-17 16:22   ` Andi Kleen [this message]

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=20200117162236.GJ302770@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=eranian@google.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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