diff options
author | Wonhyuk Yang <vvghjk1234@gmail.com> | 2020-10-30 04:38:20 +0300 |
---|---|---|
committer | Dennis Zhou <dennis@kernel.org> | 2021-02-14 20:34:05 +0300 |
commit | d7d29ac76f7efb506bcecc092641e704f791d92d (patch) | |
tree | 00c6e82ebc6252d53c4d2236d27928417d14c323 /include/linux/compiler_attributes.h | |
parent | 92bf22614b21a2706f4993b278017e437f7785b3 (diff) | |
download | linux-d7d29ac76f7efb506bcecc092641e704f791d92d.tar.xz |
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: Wonhyuk Yang <vvghjk1234@gmail.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
[Dennis: added cpumask_clear() call and #include cpumask.h.]
Diffstat (limited to 'include/linux/compiler_attributes.h')
0 files changed, 0 insertions, 0 deletions