All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFCv4 0/7]  arm_pmu/perf tools: play nicely with CPU PMU cpumasks
Date: Thu, 8 Sep 2016 12:29:03 +0100	[thread overview]
Message-ID: <20160908112902.GA26570@leverpostej> (raw)
In-Reply-To: <20160908103849.GF1493@arm.com>

On Thu, Sep 08, 2016 at 11:38:49AM +0100, Will Deacon wrote:
> On Thu, Sep 08, 2016 at 11:21:45AM +0100, Mark Rutland wrote:
> > Complicating matters, prior to commit 00e727bb389359c8 ("perf stat: Balance
> > opening and reading events"), from version two of this series, perf-stat would
> > behave erroneously in the presence of a cpumask file, blocking forever after
> > the workload completed. While this is now fixed, existing binaries (e.g. those
> > shipped by distributions) would be broken by the addition of a cpumask file
> > kernel-side.
> > 
> > To cater for this, this series adds support for a new PMU sysfs file, named
> > 'cpus' rather than 'cpumask', listing a number of CPUs that a logical PMU
> > covers. As old binaries will not look for this, this can be safely added to the
> > kernel without risk of breakage.
> 
> On my x86 laptop, I have the following under /sys/bus/event_source/devices:
> 
> power/cpumask 0
> uncore_arb/cpumask 0
> uncore_imc/cpumask 0
> uncore_cbox_0/cpumask 0
> uncore_cbox_1/cpumask 0
> cstate_core/cpumask 0-1
> cstate_pkg/cpumask 0
> 
> Are you saying that, prior to 00e727bb3893, perf stat blocks forever on
> those PMUs? If so, wouldn't we need to rename all those files too?

No. I should have better described the issue above.

The issue fixed by commit 00e727bb3893 only affects task-bound events,
when perf-stat opens a counter per-thread.

All of the above are uncore PMUs, and only support cpu-bound events.
Thus they are not affected.

Thanks,
Mark.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, acme@kernel.org,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	mingo@redhat.com, peterz@infradead.org
Subject: Re: [RFCv4 0/7]  arm_pmu/perf tools: play nicely with CPU PMU cpumasks
Date: Thu, 8 Sep 2016 12:29:03 +0100	[thread overview]
Message-ID: <20160908112902.GA26570@leverpostej> (raw)
In-Reply-To: <20160908103849.GF1493@arm.com>

On Thu, Sep 08, 2016 at 11:38:49AM +0100, Will Deacon wrote:
> On Thu, Sep 08, 2016 at 11:21:45AM +0100, Mark Rutland wrote:
> > Complicating matters, prior to commit 00e727bb389359c8 ("perf stat: Balance
> > opening and reading events"), from version two of this series, perf-stat would
> > behave erroneously in the presence of a cpumask file, blocking forever after
> > the workload completed. While this is now fixed, existing binaries (e.g. those
> > shipped by distributions) would be broken by the addition of a cpumask file
> > kernel-side.
> > 
> > To cater for this, this series adds support for a new PMU sysfs file, named
> > 'cpus' rather than 'cpumask', listing a number of CPUs that a logical PMU
> > covers. As old binaries will not look for this, this can be safely added to the
> > kernel without risk of breakage.
> 
> On my x86 laptop, I have the following under /sys/bus/event_source/devices:
> 
> power/cpumask 0
> uncore_arb/cpumask 0
> uncore_imc/cpumask 0
> uncore_cbox_0/cpumask 0
> uncore_cbox_1/cpumask 0
> cstate_core/cpumask 0-1
> cstate_pkg/cpumask 0
> 
> Are you saying that, prior to 00e727bb3893, perf stat blocks forever on
> those PMUs? If so, wouldn't we need to rename all those files too?

No. I should have better described the issue above.

The issue fixed by commit 00e727bb3893 only affects task-bound events,
when perf-stat opens a counter per-thread.

All of the above are uncore PMUs, and only support cpu-bound events.
Thus they are not affected.

Thanks,
Mark.

  reply	other threads:[~2016-09-08 11:29 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 10:21 [RFCv4 0/7] arm_pmu/perf tools: play nicely with CPU PMU cpumasks Mark Rutland
2016-09-08 10:21 ` Mark Rutland
2016-09-08 10:21 ` [RFCv4 1/7] drivers/perf: arm_pmu: add common attr group fields Mark Rutland
2016-09-08 10:21   ` Mark Rutland
2016-09-09 10:25   ` Will Deacon
2016-09-09 10:25     ` Will Deacon
2016-09-09 11:05     ` Mark Rutland
2016-09-09 11:05       ` Mark Rutland
2016-09-08 10:21 ` [RFCv4 2/7] arm64: perf: move to common attr_group fields Mark Rutland
2016-09-08 10:21   ` Mark Rutland
2016-09-08 10:21 ` [RFCv4 3/7] arm: " Mark Rutland
2016-09-08 10:21   ` Mark Rutland
2016-09-08 10:21 ` [RFCv4 4/7] drivers/perf: arm_pmu: only use common attr_groups Mark Rutland
2016-09-08 10:21   ` Mark Rutland
2016-09-08 10:21 ` [RFCv4 5/7] drivers/perf: arm_pmu: expose a cpumask in sysfs Mark Rutland
2016-09-08 10:21   ` Mark Rutland
2016-09-09 10:24   ` Will Deacon
2016-09-09 10:24     ` Will Deacon
2016-09-09 11:04     ` Mark Rutland
2016-09-09 11:04       ` Mark Rutland
2016-09-08 10:21 ` [RFCv4 6/7] perf: util: only open events on CPUs an evsel permits Mark Rutland
2016-09-08 10:21   ` Mark Rutland
2016-09-09  5:53   ` [tip:perf/core] perf evlist: Only " tip-bot for Mark Rutland
2016-09-08 10:21 ` [RFCv4 7/7] perf: util: support alternative sysfs cpumask Mark Rutland
2016-09-08 10:21   ` Mark Rutland
2016-09-09  5:54   ` [tip:perf/core] perf pmu: Support " tip-bot for Mark Rutland
2016-09-08 10:38 ` [RFCv4 0/7] arm_pmu/perf tools: play nicely with CPU PMU cpumasks Will Deacon
2016-09-08 10:38   ` Will Deacon
2016-09-08 11:29   ` Mark Rutland [this message]
2016-09-08 11:29     ` Mark Rutland
2016-09-08 16:25 ` Arnaldo Carvalho de Melo
2016-09-08 16:25   ` Arnaldo Carvalho de Melo
2016-09-08 18:16   ` Peter Zijlstra
2016-09-08 18:16     ` Peter Zijlstra
2016-09-09  9:31     ` Will Deacon
2016-09-09  9:31       ` Will Deacon

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=20160908112902.GA26570@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.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 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.