lkml.org 
[lkml]   [2024]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] sched/topology: Optimize topology_span_sane()
On Wed, Apr 10, 2024 at 04:33:11PM -0500, Kyle Meyer wrote:
> Optimize topology_span_sane() by removing duplicate comparisons.
>
> Since topology_span_sane() is called inside of for_each_cpu(), each
> pervious CPU has already been compared against every other CPU. The

previous

> current CPU only needs to be compared against higher-numbered CPUs.
>
> The total number of comparisons is reduced from N * (N - 1) to
> N * (N - 1) / 2 on each non-NUMA scheduling domain level.

Thank you, now it makes sense.

--
With Best Regards,
Andy Shevchenko



\
 
 \ /
  Last update: 2024-05-27 16:35    [W:0.048 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site