linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	linux-kernel@vger.kernel.org, jolsa@redhat.com,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 4/5] perf record: mmap output file - v5
Date: Tue, 19 Nov 2013 16:31:42 +0100	[thread overview]
Message-ID: <20131119153142.GA10913@gmail.com> (raw)
In-Reply-To: <20131119134508.GN3866@twins.programming.kicks-ass.net>


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, Nov 19, 2013 at 02:13:04PM +0100, Ingo Molnar wrote:
> > 
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> > 
> > > On Tue, Nov 19, 2013 at 12:48:10PM +0100, Peter Zijlstra wrote:
> > > > And that does indeed seem to side-step the perf sw pagefault event, but
> > > > that is arguably a perf bug.
> > > 
> > > To clarify; mm/memory.c:handle_mm_fault() is where the VM counts its 
> > > generic PGFAULT event, but our perf sw event is in the arch fault 
> > > handler.
> > > 
> > > So they count different but related things.
> > 
> > I think that assymetry was intended: we didn't want to count 
> > 'synchronous' pagefaults like get_user_pages() or mlock() bringing 
> > in pages, only asynchronous/real ones, or so.
> 
> OK, I couldn't remember.
> 
> Anyway, I don't want to hold up this patch set, and the speedup in 
> the 'normal' case is nice.
> 
> The only reason I reacted was because the changelog mentioned 
> avoiding a feedback loop -- so I obviously had to point out that it 
> didn't do such a thing, it only changed the details of the loop.

So with MAP_POPULATE the 'feedback window' is moved entirely into the 
kernel (to within a single syscall) and is also reduced significantly, 
compared to a write() loop.

While you are right that it is not an elimination of the problem - yet 
it is still a significant reduction of its cross section surface in 
practice.

> I'm fairly certain this particular problem is unavoidable, no matter 
> what the mechanism used, you can always create feedback.

Well, we could exclude the profiling task itself from profiling events 
(just like ftrace and core bits of perf does it out of necessity), but 
I intentionally wanted to avoid that, to make sure we are honest and 
to make sure people don't tolerate profiling overhead that disturbs 
other workloads.

Thanks,

	Ingo

  reply	other threads:[~2013-11-19 15:31 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 14:46 [PATCH 0/5] perf record: mmap output file - v5 David Ahern
2013-11-12 14:46 ` [PATCH 1/5] perf record: Fix segfault with --no-mmap-pages David Ahern
2013-11-12 21:57   ` [tip:perf/urgent] " tip-bot for David Ahern
2013-11-12 14:46 ` [PATCH 2/5] perf tool: Round mmap pages to power 2 - v2 David Ahern
2013-11-12 21:57   ` [tip:perf/urgent] perf evlist: " tip-bot for David Ahern
2013-11-12 14:46 ` [PATCH 3/5] perf tool: Refactor mmap_pages parsing David Ahern
2013-11-12 21:57   ` [tip:perf/urgent] perf evlist: " tip-bot for David Ahern
2013-11-12 14:46 ` [PATCH 4/5] perf record: mmap output file - v5 David Ahern
2013-11-12 14:57   ` Peter Zijlstra
2013-11-12 15:07     ` Arnaldo Carvalho de Melo
2013-11-12 15:19       ` Peter Zijlstra
2013-11-12 15:36         ` David Ahern
2013-11-12 21:11           ` Ingo Molnar
2013-11-13 11:34             ` Peter Zijlstra
2013-11-13 11:50               ` Ingo Molnar
2013-11-13 12:16                 ` Peter Zijlstra
2013-11-13 14:29                 ` David Ahern
2013-11-15 16:41               ` David Ahern
2013-11-18  9:01                 ` Peter Zijlstra
2013-11-18  9:40                   ` Ingo Molnar
2013-11-19  0:24                     ` Namhyung Kim
2013-11-19  0:34                       ` David Ahern
2013-11-19  1:48                         ` Namhyung Kim
2013-11-19  2:02                         ` Namhyung Kim
2013-11-19  2:13                         ` Namhyung Kim
2013-11-19  2:17                           ` David Ahern
2013-11-19  2:30                             ` Namhyung Kim
2013-11-19  2:33                               ` David Ahern
2013-11-19  2:36                                 ` Namhyung Kim
2013-11-19  6:58                                 ` Ingo Molnar
2013-11-19 11:48                                   ` Peter Zijlstra
2013-11-19 11:49                                     ` Peter Zijlstra
2013-11-19 13:13                                       ` Ingo Molnar
2013-11-19 13:45                                         ` Peter Zijlstra
2013-11-19 15:31                                           ` Ingo Molnar [this message]
2013-11-19 16:09                                             ` David Ahern
2013-11-19 16:14                                               ` Ingo Molnar
2013-11-19 12:08                         ` Peter Zijlstra
2013-11-19  6:54                       ` Ingo Molnar
2013-11-12 14:46 ` [PATCH 5/5] perf record: Handle out of space failures writing data with mmap David Ahern
2013-11-12 21:19   ` Ingo Molnar
2013-11-13 14:33     ` David Ahern

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=20131119153142.GA10913@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@ghostprotocols.net \
    --cc=dsahern@gmail.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@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).