lkml.org 
[lkml]   [2014]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 2/7] perf: add AUX area to ring buffer for raw data streams
On Wed, Jun 25, 2014 at 02:09:31PM +0300, Alexander Shishkin wrote:
> Peter Zijlstra <peterz@infradead.org> writes:
>
> > On Wed, Jun 11, 2014 at 06:41:45PM +0300, Alexander Shishkin wrote:
> >> + /*
> >> + * Set up pmu-private data structures for an AUX area
> >> + */
> >> + void *(*setup_aux) (int cpu, void **pages,
> >> + int nr_pages, bool overwrite);
> >> + /* optional */
> >> +
> >> + /*
> >> + * Free pmu-private AUX data structures
> >> + */
> >> + void (*free_aux) (void *aux); /* optional */
> >
> > I was hoping you could replace those with a PERF_CAP_AUX or something
> > and then have one generic allocation routine like you provide in the
> > subsequent patches.
>
> I need these to allocate pmu-specific SG tables now, which I don't see
> how to generalize nicely. User-visible aux_pages are allocated in the
> generic rb_alloc_aux().
>
> As for sg tables, the alternative would be to allocate them in the
> event::pmu::add() path, which is probably not very good for
> performance, unless I'm missing something? Like, I can allocate stuff in
> the first add() and then free it in event::destroy().
>
> Or, we can assume a generic sg table format and allocate them in the
> generic code, but then we'll need more capabilities to indicate at least
> the size of a table entry. PT needs 64 bits per entry, ARM's TMC needs
> 32 and the non-SG PT will still need some tables. But I'd rather leave
> this part to the pmu drivers. What do you think?

Ah, I wasn't aware.. too bad. Maybe add this to the changelog.


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