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)
Jan 20 2024, 9:17 AM
Unknown Object (File)
Dec 23 2023, 6:31 AM
Unknown Object (File)
Nov 30 2023, 4:19 AM
Unknown Object (File)
Oct 6 2023, 4:17 PM
Unknown Object (File)
Oct 5 2023, 2:17 PM
Unknown Object (File)
Sep 18 2023, 1:31 AM
Unknown Object (File)
Aug 17 2023, 1:12 AM
Unknown Object (File)
Aug 16 2023, 1:09 AM
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.