HomeFreeBSD

Reduce traffic on vm_cnt.v_free_count

Description

Reduce traffic on vm_cnt.v_free_count

The variable is modified with the highly contended page free queue lock.
It unnecessarily shares a cacheline with purely read-only fields and is
re-read after the lock is dropped in the page allocation code making the
hold time longer.

Pad the variable just like the others and store the value as found with
the lock held instead of re-reading.

Provides a modest 1%-ish speed up in concurrent page faults.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D12665

Details

Provenance
mjgAuthored on
Reviewer
kib
Differential Revision
D12665: Reduce traffic on vm_cnt.v_free_count
Parents
rS324609: mtx: change MTX_UNOWNED from 4 to 0
Branches
Unknown
Tags
Unknown