linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Vince Weaver <vince@deater.net>,
	Stephane Eranian <eranian@google.com>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 3/3] perf: Allow kernel filters on cpu events
Date: Fri, 27 Jan 2017 10:38:01 -0700	[thread overview]
Message-ID: <CANLsYkzaQEc5TSmqS7rKtO-iZ2LjMjdxiUvt2XinJ=d=5xXGvw@mail.gmail.com> (raw)
In-Reply-To: <87efzobs6d.fsf@ashishki-desk.ger.corp.intel.com>

On 27 January 2017 at 05:31, Alexander Shishkin
<alexander.shishkin@linux.intel.com> wrote:
> Mathieu Poirier <mathieu.poirier@linaro.org> writes:
>
>> On Thu, Jan 26, 2017 at 11:40:57AM +0200, Alexander Shishkin wrote:
>>> +    if (!ifh->nr_file_filters)
>>> +            return;
>>
>> Is this mandatory or an optimisation to avoid circling through a list of filters
>> that don't included user space files?
>
> It's both. It stems from the fact that the remainder of this function
> relies on ctx::task not being NULL, which is not the case with cpu
> contexts and now that we've enabled address filters for such contexts,
> it's a problem. So checking for !task would have done the trick here,
> but this way we'll also avoid going down this path for task contexts
> in the absence of file-based filters. In particular, grabbing the mmap
> semaphore and filters spinlock we can do without.

Yes, I see it now.

Do you have bigger plans for ->nr_file_filters?  If the purpose is
only to indicate the presence of user space files then it should be a
'bool' type (and probably changed to ->file_filters).

Thanks,
Mathieu

>
> Regards,
> --
> Alex

  reply	other threads:[~2017-01-27 21:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  9:40 [PATCH 0/3] perf: Updates for address filters Alexander Shishkin
2017-01-26  9:40 ` [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Alexander Shishkin
2017-01-26 13:02   ` kbuild test robot
2017-01-26 13:24     ` Alexander Shishkin
2017-01-26 18:26   ` Mathieu Poirier
2017-01-27 12:12     ` Alexander Shishkin
2017-01-27 17:17       ` Mathieu Poirier
2017-02-01 12:46         ` Alexander Shishkin
2017-02-01 21:33           ` Mathieu Poirier
2017-02-01 22:15             ` Mathieu Poirier
2017-02-02 10:42               ` Alexander Shishkin
2017-02-02 17:36                 ` Mathieu Poirier
2017-02-02 16:22             ` Alexander Shishkin
2017-02-07 17:50               ` Mathieu Poirier
     [not found]                 ` <20180117123137.3hlmudzu5eogl53n@ukko.fi.intel.com>
2018-01-18 16:59                   ` Mathieu Poirier
2018-01-18 17:06                     ` Will Deacon
2018-01-18 18:19                       ` Mathieu Poirier
2018-01-19 18:50                   ` Mathieu Poirier
2017-01-26  9:40 ` [PATCH 2/3] perf: Do error out on a kernel filter on an exclude_filter event Alexander Shishkin
2017-01-26 18:32   ` Mathieu Poirier
2017-02-10  8:33   ` [tip:perf/core] perf/core: " tip-bot for Alexander Shishkin
2017-01-26  9:40 ` [PATCH 3/3] perf: Allow kernel filters on cpu events Alexander Shishkin
2017-01-26 21:38   ` Mathieu Poirier
2017-01-27 12:31     ` Alexander Shishkin
2017-01-27 17:38       ` Mathieu Poirier [this message]
2017-02-10  8:07   ` Ingo Molnar
2017-02-14 12:59     ` Alexander Shishkin
2017-02-10  8:34   ` [tip:perf/core] perf/core: Allow kernel filters on CPU events tip-bot for Alexander Shishkin

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='CANLsYkzaQEc5TSmqS7rKtO-iZ2LjMjdxiUvt2XinJ=d=5xXGvw@mail.gmail.com' \
    --to=mathieu.poirier@linaro.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=vince@deater.net \
    --cc=will.deacon@arm.com \
    /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).