Page MenuHomeFreeBSD

uma: Avoid allocating buckets with the cross-domain lock held
ClosedPublic

Authored by markj on Nov 23 2020, 2:33 PM.
Tags
None
Referenced Files
F169088336: D27341.id79903.diff
Mon, Aug 31, 9:22 AM
F169064075: D27341.id80154.diff
Mon, Aug 31, 7:33 AM
F169063668: D27341.id.diff
Mon, Aug 31, 7:32 AM
F169056809: D27341.diff
Mon, Aug 31, 7:02 AM
Unknown Object (File)
Fri, Aug 28, 1:40 PM
Unknown Object (File)
Wed, Aug 26, 10:59 AM
Unknown Object (File)
Tue, Aug 25, 12:53 AM
Unknown Object (File)
Mon, Aug 24, 4:10 AM
Subscribers

Details

Summary

Allocation of a bucket can trigger a cross-domain free in the bucket
zone, e.g., if the per-CPU alloc bucket is empty, we free it and get
migrated to a remote domain. I believe this can lead to deadlocks,
since a bucket zone may allocate buckets from itself, or a pair of
bucket zones could be allocating from each other.

Fix the problem by dropping the cross-domain lock before allocating a
new bucket and handling refill races. I added a list of empty buckets
to ensure that we can make forward progress.

Diff Detail

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

Event Timeline

markj requested review of this revision.Nov 23 2020, 2:33 PM
markj created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Nov 30 2020, 4:19 PM
This revision was automatically updated to reflect the committed changes.