• Wonhyuk Yang's avatar
    percpu: reduce the number of cpu distance comparisons · d7d29ac7
    Wonhyuk Yang authored
    
    
    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.]
    d7d29ac7
percpu.c 95.6 KB