diff options
author | Kyle Meyer <[email protected]> | 2024-04-10 16:33:11 -0500 |
---|---|---|
committer | Yury Norov <[email protected]> | 2024-05-09 09:25:08 -0700 |
commit | 05037e5f0f17935a86861f9610f941ebf346a95e (patch) | |
tree | e018ce2d77e9abcadef1c7227343f26c03dfed70 /include/linux/compiler_attributes.h | |
parent | 6802f9347993a534797847f627c27f4334067945 (diff) |
sched/topology: Optimize topology_span_sane()
Optimize topology_span_sane() by removing duplicate comparisons.
Since topology_span_sane() is called inside of for_each_cpu(), each
previous CPU has already been compared against every other CPU. The
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.
Signed-off-by: Kyle Meyer <[email protected]>
Reviewed-by: Yury Norov <[email protected]>
Acked-by: Vincent Guittot <[email protected]>
Signed-off-by: Yury Norov <[email protected]>
Diffstat (limited to 'include/linux/compiler_attributes.h')
0 files changed, 0 insertions, 0 deletions