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)
Oct 29 2024, 9:33 PM
Unknown Object (File)
Oct 21 2024, 4:51 PM
Unknown Object (File)
Oct 20 2024, 12:23 PM
Unknown Object (File)
Oct 7 2024, 12:37 PM
Unknown Object (File)
Sep 19 2024, 12:22 AM
Unknown Object (File)
Sep 18 2024, 1:02 AM
Unknown Object (File)
Sep 17 2024, 12:27 AM
Unknown Object (File)
Sep 17 2024, 12:22 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)".