Page MenuHomeFreeBSD

Reduce traffic on vm_cnt.v_free_count
ClosedPublic

Authored by mjg on Oct 13 2017, 7:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 7:51 AM
Unknown Object (File)
Dec 20 2023, 5:10 AM
Unknown Object (File)
Oct 22 2023, 10:36 PM
Unknown Object (File)
Sep 26 2023, 10:01 PM
Unknown Object (File)
Aug 7 2023, 1:23 PM
Unknown Object (File)
Aug 2 2023, 5:13 AM
Unknown Object (File)
Aug 2 2023, 5:12 AM
Unknown Object (File)
Aug 2 2023, 5:12 AM
Subscribers

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 Not Applicable
Unit
Tests Not Applicable

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

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