lkml.org 
[lkml]   [2017]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 0/6] event synthesization multithreading for perf record

* Jiri Olsa <jolsa@redhat.com> wrote:

> I recently made some changes on threaded record, which are based
> on Namhyungs time* API, which is needed to read/sort the data afterwards
>
> but I wasn't able to get any substantial and constant reduce of LOST events
> and then I got sidetracked and did not finish, but it's in here:

So, in the context of system-wide profiling, the way that would work best I think
is the following:

thread #0 binds itself to CPU#0 (via sched_setaffinity) and creates a per-CPU event on CPU#0
thread #1 binds itself to CPU#1 (via sched_setaffinity) and creates a per-CPU event on CPU#1
thread #2 binds itself to CPU#2 (via sched_setaffinity) and creates a per-CPU event on CPU#2

etc.

Is this how you implemented it?

If the threads in the thread pool are just free-running then the scheduler might
not migrate it to the 'right' CPU that is streaming the perf events and there will
be a lot of cross-talking between CPUs.

Inherited events (default 'perf record') is tougher.

Thanks,

Ingo

\
 
 \ /
  Last update: 2017-10-24 15:47    [W:0.919 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site