Page MenuHomeFreeBSD

Fix a case where we did not properly track the ub_seq.
ClosedPublic

Authored by jeff on Mon, Feb 10, 8:28 PM.

Details

Summary

uzd_cross did not have a seq set until it was full. If the bucket was reaped in a low memory situation we would not wait for seq to expire or call the dtors. We had a similar problem via uma_zdestroy(). I wanted to place the advance call in cache_bucket_unload() but it just didn't really work out any cleaner.

This now passes invariants with a lot of stress and memory pressure followed by destroying zones.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jeff created this revision.Mon, Feb 10, 8:28 PM
jeff edited the summary of this revision. (Show Details)Mon, Feb 10, 8:59 PM
jeff added reviewers: markj, rlibby.
jeff set the repository for this revision to rS FreeBSD src repository.
jeff added inline comments.Mon, Feb 10, 9:40 PM
sys/vm/uma_core.c
562 ↗(On Diff #68094)

this was requested by gleb for coverity

markj accepted this revision.Tue, Feb 11, 6:32 PM
markj added inline comments.
sys/vm/uma_core.c
985 ↗(On Diff #68094)

You can micro-optimize this the same way as zone fetch bucket, to avoid looping over bucket entries when it's not necessary to do so.

This revision is now accepted and ready to land.Tue, Feb 11, 6:32 PM