linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: agustinv@codeaurora.org (agustinv at codeaurora.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V1] perf: qcom: Add L3 cache PMU driver
Date: Mon, 21 Mar 2016 12:37:45 -0400	[thread overview]
Message-ID: <a872fdb890d5a2a09fe3915f67b24487@codeaurora.org> (raw)
In-Reply-To: <20160321120409.GT6344@twins.programming.kicks-ass.net>

On 2016-03-21 08:04, Peter Zijlstra wrote:
> On Mon, Mar 21, 2016 at 10:35:08AM +0000, Mark Rutland wrote:
>> > +static
>> > +int qcom_l3_cache__event_add(struct perf_event *event, int flags)
>> > +{
>> > +	struct l3cache_pmu *system = to_l3cache_pmu(event->pmu);
>> > +	struct hw_perf_event *hwc = &event->hw;
>> > +	int idx;
>> > +	int prev_cpu;
>> > +	int err = 0;
>> > +
>> > +	/*
>> > +	 * We need to disable the pmu while adding the event, otherwise
>> > +	 * the perf tick might kick-in and re-add this event.
>> > +	 */
>> > +	perf_pmu_disable(event->pmu);
> 
> Why did you write that? If you really need this you did something
> seriously wrong elsewhere, because:
> 
> kernel/events/core.c:event_sched_in() is the only place calling
> pmu::add() and that explicitly already does this.

This might have been before I added the restriction that only one CPU 
can open the events, but I will double-check and remove this as it is 
unnecessary.

Thanks,
Agustin

  reply	other threads:[~2016-03-21 16:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 20:37 [PATCH V1] perf: qcom: Add L3 cache PMU driver Agustin Vega-Frias
2016-03-21  9:04 ` Peter Zijlstra
2016-03-21 15:56   ` agustinv at codeaurora.org
2016-03-21 16:00     ` Peter Zijlstra
2016-03-21 10:35 ` Mark Rutland
2016-03-21 10:54   ` Will Deacon
2016-03-21 12:04   ` Peter Zijlstra
2016-03-21 16:37     ` agustinv at codeaurora.org [this message]
2016-03-21 16:06   ` agustinv at codeaurora.org
2016-03-22 18:33   ` agustinv at codeaurora.org
     [not found]     ` <56F26FF1.90002@arm.com>
2016-03-23 12:36       ` agustinv at codeaurora.org
2016-03-23 14:46         ` Peter Zijlstra
2016-03-22 20:48 ` 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=a872fdb890d5a2a09fe3915f67b24487@codeaurora.org \
    --to=agustinv@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).