All of lore.kernel.org
 help / color / mirror / Atom feed
From: peterz@infradead.org (Peter Zijlstra)
To: linux-arm-kernel@lists.infradead.org
Subject: linux-next: perf issue on big.LITTLE since 26657848502b7847
Date: Mon, 25 Apr 2016 21:03:34 +0200	[thread overview]
Message-ID: <20160425190334.GK3448@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160425175837.GB3141@leverpostej>

On Mon, Apr 25, 2016 at 06:58:37PM +0100, Mark Rutland wrote:
> Hi,
> 
> When booting an arm64 defconfig linux-next (next-20160422) on an ARM
> Juno system, I hit a WARN_ON_ONCE in perf_pmu_register (see backtrace at
> the end of this email).
> 
> This was introduced by commit 26657848502b7847 ("perf/core: Verify we
> have a single perf_hw_context PMU") where we forcefully prevent multiple
> PMUs from sharing perf_hw_context (with a warning), and force additional
> PMUs to use perf_invalid_context.
> 
> Generally that makes sense, but unfortunately it breaks systems which
> genuinely do have disparate HW (i.e. CPU) PMUs, such as Juno, which has
> both Cortex-A57 PMUs and Cortex-A53 PMUs. We register a logical PMU for
> each microarchitecture, which accept CPU-bound events for relevant CPUs,
> or task-bound events. One task may have events for multiple logical PMUs
> (and hence, they must share perf_hw_context).
> 
> The commit message for 26657848502b7847 mentions that the check is
> intended to ensure that round-robin scheduling of events works, though
> we already work around that issue by other means. In commit
> 66eb579e66ecfea5 ("perf: allow for PMU-specific event filtering"), we
> added a PMU-specific callback specifically to avoid this issue, which we
> wired up for ARM in commit c904e32a69b7c779 ("arm: perf: filter
> unschedulable events").
> 
> Are you happy to revert 26657848502b787 for the timebeing? Or to somehow
> predicate the check such that it doesn't adversely affect those HW PMUs?

I'm happy with a chicken bit for now, its already found two real issues,
so I'd like to keep it.

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: linux-next: perf issue on big.LITTLE since 26657848502b7847
Date: Mon, 25 Apr 2016 21:03:34 +0200	[thread overview]
Message-ID: <20160425190334.GK3448@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160425175837.GB3141@leverpostej>

On Mon, Apr 25, 2016 at 06:58:37PM +0100, Mark Rutland wrote:
> Hi,
> 
> When booting an arm64 defconfig linux-next (next-20160422) on an ARM
> Juno system, I hit a WARN_ON_ONCE in perf_pmu_register (see backtrace at
> the end of this email).
> 
> This was introduced by commit 26657848502b7847 ("perf/core: Verify we
> have a single perf_hw_context PMU") where we forcefully prevent multiple
> PMUs from sharing perf_hw_context (with a warning), and force additional
> PMUs to use perf_invalid_context.
> 
> Generally that makes sense, but unfortunately it breaks systems which
> genuinely do have disparate HW (i.e. CPU) PMUs, such as Juno, which has
> both Cortex-A57 PMUs and Cortex-A53 PMUs. We register a logical PMU for
> each microarchitecture, which accept CPU-bound events for relevant CPUs,
> or task-bound events. One task may have events for multiple logical PMUs
> (and hence, they must share perf_hw_context).
> 
> The commit message for 26657848502b7847 mentions that the check is
> intended to ensure that round-robin scheduling of events works, though
> we already work around that issue by other means. In commit
> 66eb579e66ecfea5 ("perf: allow for PMU-specific event filtering"), we
> added a PMU-specific callback specifically to avoid this issue, which we
> wired up for ARM in commit c904e32a69b7c779 ("arm: perf: filter
> unschedulable events").
> 
> Are you happy to revert 26657848502b787 for the timebeing? Or to somehow
> predicate the check such that it doesn't adversely affect those HW PMUs?

I'm happy with a chicken bit for now, its already found two real issues,
so I'd like to keep it.

  reply	other threads:[~2016-04-25 19:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 17:58 linux-next: perf issue on big.LITTLE since 26657848502b7847 Mark Rutland
2016-04-25 17:58 ` Mark Rutland
2016-04-25 19:03 ` Peter Zijlstra [this message]
2016-04-25 19:03   ` Peter Zijlstra
2016-04-26 10:33   ` [PATCH] perf/core / arm_pmu: special-case hetereogeneous CPUs Mark Rutland
2016-04-26 10:33     ` Mark Rutland
2016-05-04 13:44     ` Mark Rutland
2016-05-04 13:44       ` Mark Rutland
2016-05-04 13:46       ` Will Deacon
2016-05-04 13:46         ` Will Deacon
2016-05-04 15:08       ` Peter Zijlstra
2016-05-04 15:08         ` Peter Zijlstra
2016-05-04 15:26         ` Mark Rutland
2016-05-04 15:26           ` Mark Rutland
2016-05-05  9:48     ` [tip:perf/core] perf/arm: Special-case " tip-bot for Mark Rutland

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=20160425190334.GK3448@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --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.