lkml.org 
[lkml]   [2014]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC v2 1/7] perf: add data_{offset,size} to user_page
    On 11.06.14 18:41:44, Alexander Shishkin wrote:

    > diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
    > index 853bc1c..ef95af4 100644
    > --- a/include/uapi/linux/perf_event.h
    > +++ b/include/uapi/linux/perf_event.h
    > @@ -488,9 +488,14 @@ struct perf_event_mmap_page {
    > * In this case the kernel will not over-write unread data.
    > *
    > * See perf_output_put_handle() for the data ordering.
    > + *
    > + * data_{offset,size} indicate the location and size of the perf record
    > + * buffer within the mmapped area.
    > */
    > __u64 data_head; /* head in the data section */
    > __u64 data_tail; /* user-space written tail */
    > + __u64 data_offset; /* where the buffer starts */
    > + __u64 data_size; /* data buffer size */
    > };
    >

    Yes, right. This change is useful to determine the buffer size for
    existing buffers to be able to share them (e.g. persistent events).

    If the buffer size is not known by userspace The mechanism would be to
    mmap the header page only and later remap the buffer with the correct
    buffer size determined from the header page.

    If there are no objections on this patch it would be good if this
    patch could be applied independently of the status of the follow on
    patches.

    Thanks,

    -Robert


    \
     
     \ /
      Last update: 2014-06-13 16:41    [W:5.423 / U:0.532 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site