Page MenuHomeFreeBSD

Reduce traffic on vm_cnt.v_free_count

Authored by mjg on Oct 13 2017, 7:31 PM.



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.

Diff Detail

rS FreeBSD src repository - subversion
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 12039

Event Timeline

This revision is now accepted and ready to land.Oct 13 2017, 8:09 PM
This revision was automatically updated to reflect the committed changes.
143 ↗(On Diff #33971)

The lock annotation should still be "(f)".