HomeFreeBSD

amd64: Reduce the amount of cpuset copying done for TLB shootdowns

Description

amd64: Reduce the amount of cpuset copying done for TLB shootdowns

We use pmap_invalidate_cpu_mask() to get the set of active CPUs. This
(32-byte) set is copied by value through multiple frames until we get to
smp_targeted_tlb_shootdown(), where it is copied yet again.

Avoid this copying by having smp_targeted_tlb_shootdown() make a local
copy of the active CPUs for the pmap, and drop the cpuset parameter,
simplifying callers. Also leverage the use of the non-destructive
CPU_FOREACH_ISSET to avoid unneeded copying within
smp_targeted_tlb_shootdown().

Reviewed by: alc, kib
Tested by: pho
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32792

Details

Provenance
markjAuthored on Nov 15 2021, 5:52 PM
Reviewer
alc
Differential Revision
D32792: amd64: Reduce the amount of cpuset copying done for TLB shootdowns
Parents
rG71e6e9da225a: amd64: Initialize kernel_pmap's active CPU set to all_cpus
Branches
Unknown
Tags
Unknown