lkml.org 
[lkml]   [2014]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 6/7] perf: add api for pmus to write to AUX space
On Wed, Jun 25, 2014 at 02:24:51PM +0300, Alexander Shishkin wrote:
> Peter Zijlstra <peterz@infradead.org> writes:
>
> > On Wed, Jun 11, 2014 at 06:41:49PM +0300, Alexander Shishkin wrote:
> >> +void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size,
> >> + bool truncated)
> >> +{
> >> + struct ring_buffer *rb = handle->rb;
> >> + unsigned long aux_head;
> >> +
> >> + aux_head = local_read(&rb->aux_head);
> >> + local_add(size, &rb->aux_head);
> >> +
> >> + rb->user_page->aux_head = local_read(&rb->aux_head);
> >> + smp_wmb();
> >> +
> >> + perf_output_wakeup(handle);
> >> + handle->event = NULL;
> >> +
> >> + ring_buffer_put(rb);
> >> +}
> >
> > This thing is distinctly less complex than perf_output_put_handle().. ?
>
> This one doesn't support nested writers, but there shouldn't be any
> either. But I notice now that the barrier is misplaced. Wakeup watermark
> is not yet taken care of, but will be. Anything else I'm missing?

Maybe put a comment in about explicitly not supporting nesting etc.
Maybe also a debug check to make sure we catch anybody doing it anyway.


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