lkml.org 
[lkml]   [2017]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH]: perf/core: addressing 4x slowdown during per-process profiling of STREAM benchmark on Intel Xeon Phi
On Mon, May 29, 2017 at 04:43:09PM +0300, Alexey Budankov wrote:
> On 29.05.2017 15:03, Alexander Shishkin wrote:
> > Alexey Budankov <alexey.budankov@linux.intel.com> writes:

> > > + } else if (event->cpu > node_event->cpu) {
> > > + node = &((*node)->rb_right);
> > > + } else {
> > > + list_add_tail(&event->group_list_entry,
> > > + &node_event->group_list);
> >
> > So why is this better than simply having per-cpu event lists plus one
> > for per-thread events?
>
> Good question. Choice of data structure and layout depends on the operations
> applied to the data so keeping groups as a tree simplifies and improves the
> implementation in terms of scalability and performance. Please ask more if
> any.

Since these lists are per context, and each task can have a context,
you'd end up with per-task-per-cpu memory, which is something we'd like
to avoid (some archs have very limited per-cpu memory space etc..).

Also, we'd like to have that tree for other reasons, like for instance
that heterogeneous PMU crud ARM has. Also, with a tree we can easier do
time based round-robin scheduling,

\
 
 \ /
  Last update: 2017-05-29 17:23    [W:0.105 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site