From: Ingo Molnar <mingo@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: kan.liang@intel.com, peterz@infradead.org, mingo@redhat.com,
linux-kernel@vger.kernel.org, jolsa@kernel.org,
wangnan0@huawei.com, hekuang@huawei.com, namhyung@kernel.org,
alexander.shishkin@linux.intel.com, adrian.hunter@intel.com,
ak@linux.intel.com
Subject: Re: [PATCH 3/4] perf record: event synthesization multithreading support
Date: Fri, 13 Oct 2017 22:06:58 +0200 [thread overview]
Message-ID: <20171013200658.gokyihds32ftwgy5@gmail.com> (raw)
In-Reply-To: <20171013143856.GP3503@kernel.org>
* 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
next prev parent reply other threads:[~2017-10-13 20:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 14:09 [PATCH 0/4] event synthesization multithreading for perf record kan.liang
2017-10-13 14:09 ` [PATCH 1/4] perf tools: pass thread info to process function kan.liang
2017-10-13 14:09 ` [PATCH 2/4] perf tools: pass thread info in event synthesization kan.liang
2017-10-13 14:09 ` [PATCH 3/4] perf record: event synthesization multithreading support kan.liang
2017-10-13 14:38 ` Arnaldo Carvalho de Melo
2017-10-13 14:58 ` Liang, Kan
2017-10-13 15:09 ` Arnaldo Carvalho de Melo
2017-10-13 20:06 ` Ingo Molnar [this message]
2017-10-13 14:09 ` [PATCH 4/4] perf record: add option to set the number of thread for event synthesize kan.liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171013200658.gokyihds32ftwgy5@gmail.com \
--to=mingo@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=hekuang@huawei.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome