Page MenuHomeFreeBSD

Reduce traffic on vm_cnt.v_free_count
ClosedPublic

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

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
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.
head/sys/sys/vmmeter.h
143 ↗(On Diff #33971)

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