lkml.org 
[lkml]   [2009]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5/6] perf_counter: kerneltop: mmap_pages argument
    Peter Zijlstra writes:

    > One possible solution is making the control page writable and writing
    > the userspace read position to it, then the kernel can, on
    > perf_output_begin() detect the overflow and count the number of
    > overwritten events.
    >
    > This overflow count could then be published back into the control page.

    We could in principle have many different processes mmapping the same
    counter and reading the ring buffer, couldn't we? So which process
    gets to put its read position in the control page?

    > TBH I'm not much of a fan, making all these pages writable just opens a
    > whole can of worms, and that accurate overflow tracking will put more
    > code in the output path.

    I agree.

    Paul.


    \
     
     \ /
      Last update: 2009-03-26 03:45    [W:5.481 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site