aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_bitops.c
diff options
context:
space:
mode:
authorKyle Meyer <[email protected]>2024-04-10 21:33:11 +0000
committerYury Norov <[email protected]>2024-05-09 16:25:08 +0000
commit05037e5f0f17935a86861f9610f941ebf346a95e (patch)
treee018ce2d77e9abcadef1c7227343f26c03dfed70 /lib/test_bitops.c
parentcpumask: Add for_each_cpu_from() (diff)
downloadkernel-05037e5f0f17935a86861f9610f941ebf346a95e.tar.gz
kernel-05037e5f0f17935a86861f9610f941ebf346a95e.zip
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 'lib/test_bitops.c')
0 files changed, 0 insertions, 0 deletions