Page MenuHomeFreeBSD

UMA: Use LIFO for non-SMR bucket caches.
ClosedPublic

Authored by markj on Sep 14 2020, 8:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 2:29 PM
Unknown Object (File)
Fri, Nov 8, 8:38 PM
Unknown Object (File)
Tue, Nov 5, 7:41 PM
Unknown Object (File)
Mon, Oct 28, 6:03 PM
Unknown Object (File)
Fri, Oct 25, 5:50 AM
Unknown Object (File)
Oct 4 2024, 4:58 AM
Unknown Object (File)
Oct 1 2024, 10:28 AM
Unknown Object (File)
Sep 27 2024, 3:50 PM
Subscribers

Details

Summary

When SMR was introduced, zone_put_bucket() was changed to always place
full buckets at the end of the queue. However, it is generally
preferable to use recently used buckets since items are more likely to
be resident in data caches. For buckets that have no constraint on
reuse, use a last-in-first-out ordering. Gleb reported that this
measurably reduces time spent in UMA when allocating from vm_page cache
zones.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Sep 14 2020, 8:58 PM
markj created this revision.

Any objections to this change? I'd like to commit soon if not.

sys/vm/uma_core.c
741–744 ↗(On Diff #77021)

Maybe I'm confused, but isn't this test backward? Shouldn't it be, if smr then tail else head? Maybe also better written as ub_seq == SMR_SEQ_INVALID?

markj added inline comments.
sys/vm/uma_core.c
741–744 ↗(On Diff #77021)

Sorry, I missed uploading the fix. You're right, this is supposed to be ub_seq == SMR_SEQ_INVALID.

markj marked an inline comment as done.

Fix the ub_seq test.

This revision is now accepted and ready to land.Sep 30 2020, 4:24 PM
This revision was automatically updated to reflect the committed changes.