lkml.org 
[lkml]   [2017]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] perf record: event synthesization multithreading support

* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Em Fri, Oct 13, 2017 at 07:09:26AM -0700, kan.liang@intel.com escreveu:
> > From: Kan Liang <Kan.liang@intel.com>
> >
> > The process function process_synthesized_event writes the process
> > result to perf.data, which is not multithreading friendly.
> >
> > Realloc buffer for each thread to temporarily keep the processing
> > result. Write them to the perf.data at the end of event synthesization.
> > The new method doesn't impact the final result, because
> > - The order of the synthesized event is not important.
> > - The number of synthesized event is limited. Usually, it only needs
> > hundreds of Kilobyte to store all the synthesized event.
> > It's unlikly failed because of lack of memory.
>
> Why not write to a per cpu file and then at the end merge them? Leave
> the memory management to the kernel, i.e. in most cases you may even not
> end up touching the disk, when memory is plentiful, just rewind the per
> event files and go on dumping to the main perf.data file.
>
> At some point we may just don't do this merging, and keep per cpu files
> all the way to perf report, etc. This would be a first foray into
> that...

Yeah, that sounds like a really good zero-copy recording scheme, and I bet it
would scale like a crazed bat out of hell!

Thanks,

Ingo

\
 
 \ /
  Last update: 2017-10-13 22:07    [W:0.056 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site