Page MenuHomeFreeBSD

UMA: Use LIFO for non-SMR bucket caches.

Authored by markj on Mon, Sep 14, 8:58 PM.



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

Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 33900
Build 31102: arc lint + arc unit

Event Timeline

markj requested review of this revision.Mon, Sep 14, 8:58 PM
markj created this revision.
markj added a comment.Wed, Sep 23, 7:50 PM

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

rlibby added inline comments.Wed, Sep 30, 4:39 AM

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 marked an inline comment as done.Wed, Sep 30, 1:54 PM
markj added inline comments.

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

markj updated this revision to Diff 77679.Wed, Sep 30, 1:56 PM
markj marked an inline comment as done.

Fix the ub_seq test.

rlibby accepted this revision.Wed, Sep 30, 4:24 PM
This revision is now accepted and ready to land.Wed, Sep 30, 4:24 PM