All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: "ak@linux.intel.com" <ak@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Vince Weaver <vincent.weaver@maine.edu>,
	Ingo Molnar <mingo@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [RFC] perf: ref-cycle useless with watchdog changes
Date: Sun, 10 Jul 2016 11:48:11 -0700	[thread overview]
Message-ID: <CABPqkBSbNGLRgd1x2_D8t8tqSfDzxAzY-HnX3gAsfbGMwgCOEA@mail.gmail.com> (raw)

Hi,

Since Andi added:

commit 2c95afc1e83d93fac3be6923465e1753c2c53b0a
Author: Andi Kleen <ak@linux.intel.com>
Date:   Thu Jun 9 06:14:38 2016 -0700

   perf/x86/intel, watchdog: Switch NMI watchdog to ref cycles on x86


$ perf stat -e ref-cycles ls
  <not counted> ....

fails systematically because the ref-cycles is now used by the
watchdog and given this is a system-wide pinned event, it monopolizes
the fixed counter 2 which is the
only counter able to measure this event.

So we either redirect ref-cycles towards 0x013c
(cpu_clk_unhalted:xlck) or another event maybe from the msr PMU, such
as msr/tsc/ or we revert Andi's patch. Each of these solutions has
problems:

   - 0x013c is that is counts supposedly at a fixed frequency (used to
be 100Mhz)
      but this is not guaranteed and user would still need to figure
out ref frequency
      of CPU to compare with core cycles

- msr/tsc/ counts in halted state. Recent paranoid default changes, make it not
  supported by default. msr/tsc/ counts user/kernel, with paranoid=2,
it does not
  work

- Revert Andi's patch, makes everything working again at the cost of
multiplexing
  for topdown.


It is not clear to me why topdown would be so sensitive to
multiplexing compared to other metrics.

Any comment?
Thanks

             reply	other threads:[~2016-07-10 18:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-10 18:48 Stephane Eranian [this message]
2016-07-11 10:33 ` [RFC] perf: ref-cycle useless with watchdog changes Peter Zijlstra
2016-07-12  8:24   ` Stephane Eranian
2016-07-12 12:02     ` 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=CABPqkBSbNGLRgd1x2_D8t8tqSfDzxAzY-HnX3gAsfbGMwgCOEA@mail.gmail.com \
    --to=eranian@google.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.