lkml.org 
[lkml]   [2022]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 06/19] perf stat: Add 'needs_sort' argument to cpu_aggr_map__new()
On Mon, Oct 10, 2022 at 3:53 PM Ian Rogers <irogers@google.com> wrote:
>
> On Sun, Oct 9, 2022 at 10:36 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > In case of no aggregation, it needs to keep the original (cpu) ordering
> > in the aggr_map so that it can be in sync with the cpu map. This will
> > make the code easier to handle AGGR_NONE similar to others.
> >
>
> The CPU map is sorted and so sorting the aggr_map should be fine. If
> the data is already sorted then it is O(n) to sort. I think this is
> preferable to having additional complexity around whether the aggr_map
> is sorted.

The problem is that aggr_cpu_id__cmp() only checks socket, die and core
so it will have CPUs in the same core together - like 0, 4, 1, 5, 2, 6, 3, 7.

Thanks,
Namhyung

\
 
 \ /
  Last update: 2022-10-12 01:34    [W:0.274 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site