Skip to content
Commit d7d29ac7 authored by Wonhyuk Yang's avatar Wonhyuk Yang Committed by Dennis Zhou
Browse files

percpu: reduce the number of cpu distance comparisons



To build group_map[] and group_cnt[], we find out which group
CPUs belong to by comparing the distance of the cpu. However,
this includes cases where comparisons are not required.

This patch uses a bitmap to record CPUs that is not classified in
the group. CPUs that we know which group they belong to should be
cleared from the bitmap. In result, we can reduce the number of
unnecessary comparisons.

Signed-off-by: default avatarWonhyuk Yang <vvghjk1234@gmail.com>
Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
[Dennis: added cpumask_clear() call and #include cpumask.h.]
parent 92bf2261
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment