HomeFreeBSD

uma: Avoid excessive per-CPU draining

Description

uma: Avoid excessive per-CPU draining

After commit 389a3fa693ef, uma_reclaim_domain(UMA_RECLAIM_DRAIN_CPU)
calls uma_zone_reclaim_domain(UMA_RECLAIM_DRAIN_CPU) twice on each zone
in addition to globally draining per-CPU caches. This was unintended
and is unnecessarily slow; in particular, draining per-CPU caches
requires binding to each CPU.

Stop draining per-CPU caches when visiting each zone, just do it once in
pcpu_cache_drain_safe() to minimize the amount of expensive sched_bind()
calls.

Fixes: 389a3fa693ef ("uma: Add UMA_ZONE_UNMANAGED")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: gallatin, kib
Differential Revision: https://reviews.freebsd.org/D49349

Details

Provenance
markjAuthored on Mon, Mar 17, 7:12 PM
desCommitted on Mon, Mar 17, 7:12 PM
Reviewer
gallatin
Differential Revision
D49349: uma: Avoid excessive per-CPU draining
Parents
rG027b93c2f5e1: acpi_asus_wmi(4): Handle TUF-specific hotkeys internally
Branches
Unknown
Tags
Unknown