diff options
author | Eric Dumazet <edumazet@google.com> | 2021-10-07 07:35:56 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-10-29 10:02:17 +0200 |
commit | cc95a07fef06a2c7917acd827b3a8322772969eb (patch) | |
tree | d0909294b4cc76eaf9f9a9155b2bed203edf0c01 /lib/string_helpers.c | |
parent | 3906fe9bb7f1a2c8667ae54e967dc8690824f4ea (diff) |
x86/apic: Reduce cache line misses in __x2apic_send_IPI_mask()
Using per-cpu storage for @x86_cpu_to_logical_apicid is not optimal.
Broadcast IPI will need at least one cache line per cpu to access this
field.
__x2apic_send_IPI_mask() is using standard bitmask operators.
By converting x86_cpu_to_logical_apicid to an array, we divide by 16x
number of needed cache lines, because we find 16 values per cache
line. CPU prefetcher can kick nicely.
Also move @cluster_masks to READ_MOSTLY section to avoid false sharing.
Tested on a dual socket host with 256 cpus, cost for a full broadcast
is now 11 usec instead of 33 usec.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20211007143556.574911-1-eric.dumazet@gmail.com
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions