lkml.org 
[lkml]   [2013]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] perf record: mmap output file - v5
On Tue, Nov 19, 2013 at 07:58:35AM +0100, Ingo Molnar wrote:
>
> * David Ahern <dsahern@gmail.com> wrote:
>
> > This is mmap'ed output, not the ring buffers or its stack. As the
> > output file grows, new pages are needed and those are allocated on
> > access via page faults. The ftruncate only extends the file size, it
> > does not allocate pages at that time.
>
> Hm, doesn't MAP_POPULATE prefault pages in this case as well?
> Prefaulting would avoid the most obvious page fault driven feedback
> loops and it would probably be faster as well, because it avoids all
> the pagefaults ...

MAP_POPULATE does indeed seem to write pre-fault for writable maps
(mm/mlock.c:__mlock_vma_pages_range).

And that does indeed seem to side-step the perf sw pagefault event, but
that is arguably a perf bug.

If we were to fix this, MAP_POPULATE would simply generate a metric ton
of events, we'd have to write out with yet more MAP_POPULATE.


\
 
 \ /
  Last update: 2013-11-19 13:21    [W:0.110 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site