All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Tom Zanussi <tzanussi@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Paul Mackerras <paulus@samba.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com>,
	linux-kernel@vger.kernel.org, lwoodman@redhat.com,
	linux-mm@kvack.org, mingo@elte.hu, riel@redhat.com,
	rostedt@goodmis.org, akpm@linux-foundation.org,
	Munehiro Ikeda <m-ikeda@ds.jp.nec.com>,
	Atsushi Tsuji <a-tsuji@bk.jp.nec.com>
Subject: Re: [RFC PATCH -tip 2/2 v2] add a scripts for pagecache usage per process
Date: Tue, 23 Feb 2010 18:54:06 +0100	[thread overview]
Message-ID: <20100223175402.GE5357@nowhere> (raw)
In-Reply-To: <1265012255.6526.18.camel@tropicana>

On Mon, Feb 01, 2010 at 02:17:35AM -0600, Tom Zanussi wrote:
> Here's one way, using the tracepoint filters - it does make a big
> difference in this case.
> 
> Before (using the new -P option, which includes perf in the trace
> data):  
> 
> root@tropicana:~# perf record -c 1 -f -a -M -R -e filemap:add_to_page_cache -e filemap:find_get_page -e filemap:remove_from_page_cache -P sleep 5
> [ perf record: Woken up 0 times to write data ]
> [ perf record: Captured and wrote 71.201 MB perf.data (~3110815 samples) ]
> 
> After (filters out events generated by perf):
> 
> root@tropicana:~# perf record -c 1 -f -a -M -R -e filemap:add_to_page_cache -e filemap:find_get_page -e filemap:remove_from_page_cache sleep 5
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.309 MB perf.data (~13479 samples) ]
> 
> Tom
> 
> [PATCH] perf record: filter out perf process tracepoint events
> 
> The perf process itself can generate a lot of trace data, which most
> of the time isn't of any interest.  This patch adds a predicate to the
> kernel tracepoint filter of each recorded event type which effectively
> screens out any event generated by perf.
> 
> Assuming the common case would be to ignore perf, this makes it the
> default; the old behavior can be selected by using 'perf record -P'.


I think filtering out perf from the instrumentation is a very
desirable features.

But I see two drawbacks with this patch.
First of all, we want to keep perf as a part of the instrumentation
as a default behaviour I think, as it is a true part of the system
wide load. So I would rather suggest to keep it as a default and
have an exclude_perf option instead of include_perf.

The other downside is that this filtering only applies to ftrace events
and not to other perf events. I would expect an exclude_perf option
to apply to every events, not just a family of them.

This is not that easy though. It's trivial for a process bound
instrumentation as we only need to use enable_on_exec for that
(assuming we create the targeted process from perf).

Otherwise we need the cpu events to filter out a given context, which
needs to be done from the kernel, on events scheduling time.
It's just an idea, I'm adding more interested parties in Cc.

Thanks.


WARNING: multiple messages have this Message-ID (diff)
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Tom Zanussi <tzanussi@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Paul Mackerras <paulus@samba.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com>,
	linux-kernel@vger.kernel.org, lwoodman@redhat.com,
	linux-mm@kvack.org, riel@redhat.com, rostedt@goodmis.org,
	akpm@linux-foundation.org, Munehiro Ikeda <m-ikeda@ds.jp.nec.com>,
	Atsushi Tsuji <a-tsuji@bk.jp.nec.com>
Subject: Re: [RFC PATCH -tip 2/2 v2] add a scripts for pagecache usage per process
Date: Tue, 23 Feb 2010 18:54:06 +0100	[thread overview]
Message-ID: <20100223175402.GE5357@nowhere> (raw)
In-Reply-To: <1265012255.6526.18.camel@tropicana>

On Mon, Feb 01, 2010 at 02:17:35AM -0600, Tom Zanussi wrote:
> Here's one way, using the tracepoint filters - it does make a big
> difference in this case.
> 
> Before (using the new -P option, which includes perf in the trace
> data):  
> 
> root@tropicana:~# perf record -c 1 -f -a -M -R -e filemap:add_to_page_cache -e filemap:find_get_page -e filemap:remove_from_page_cache -P sleep 5
> [ perf record: Woken up 0 times to write data ]
> [ perf record: Captured and wrote 71.201 MB perf.data (~3110815 samples) ]
> 
> After (filters out events generated by perf):
> 
> root@tropicana:~# perf record -c 1 -f -a -M -R -e filemap:add_to_page_cache -e filemap:find_get_page -e filemap:remove_from_page_cache sleep 5
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.309 MB perf.data (~13479 samples) ]
> 
> Tom
> 
> [PATCH] perf record: filter out perf process tracepoint events
> 
> The perf process itself can generate a lot of trace data, which most
> of the time isn't of any interest.  This patch adds a predicate to the
> kernel tracepoint filter of each recorded event type which effectively
> screens out any event generated by perf.
> 
> Assuming the common case would be to ignore perf, this makes it the
> default; the old behavior can be selected by using 'perf record -P'.


I think filtering out perf from the instrumentation is a very
desirable features.

But I see two drawbacks with this patch.
First of all, we want to keep perf as a part of the instrumentation
as a default behaviour I think, as it is a true part of the system
wide load. So I would rather suggest to keep it as a default and
have an exclude_perf option instead of include_perf.

The other downside is that this filtering only applies to ftrace events
and not to other perf events. I would expect an exclude_perf option
to apply to every events, not just a family of them.

This is not that easy though. It's trivial for a process bound
instrumentation as we only need to use enable_on_exec for that
(assuming we create the targeted process from perf).

Otherwise we need the cpu events to filter out a given context, which
needs to be done from the kernel, on events scheduling time.
It's just an idea, I'm adding more interested parties in Cc.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2010-02-23 17:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-23  0:04 [RFC PATCH -tip 0/2 v2] pagecache tracepoints proposal Keiichi KII
2010-01-23  0:04 ` Keiichi KII
2010-01-23  0:07 ` [RFC PATCH -tip 1/2 v2] add tracepoints for pagecache Keiichi KII
2010-01-23  0:07   ` Keiichi KII
2010-01-23  2:28   ` Steven Rostedt
2010-01-23  2:28     ` Steven Rostedt
2010-01-25 22:17     ` Keiichi KII
2010-01-25 22:17       ` Keiichi KII
2010-01-23  0:08 ` [RFC PATCH -tip 2/2 v2] add a scripts for pagecache usage per process Keiichi KII
2010-01-23  0:08   ` Keiichi KII
2010-01-23  8:21   ` Tom Zanussi
2010-01-23  8:21     ` Tom Zanussi
2010-01-25 22:16     ` Keiichi KII
2010-01-25 22:16       ` Keiichi KII
2010-02-01  8:17       ` Tom Zanussi
2010-02-01  8:17         ` Tom Zanussi
2010-02-01 21:20         ` Keiichi KII
2010-02-01 21:20           ` Keiichi KII
2010-02-23 17:54         ` Frederic Weisbecker [this message]
2010-02-23 17:54           ` Frederic Weisbecker
2010-02-23 18:13           ` Peter Zijlstra
2010-02-23 18:13             ` 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=20100223175402.GE5357@nowhere \
    --to=fweisbec@gmail.com \
    --cc=a-tsuji@bk.jp.nec.com \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=k-keiichi@bx.jp.nec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lwoodman@redhat.com \
    --cc=m-ikeda@ds.jp.nec.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tzanussi@gmail.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 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.