Hi all,

Here's a couple isolated fixes to the early bucket allocator. Both of
these address issues that were uncovered due to an unrelated bug that
temporarily caused the early bucket allocator to run indefinitely. Patch
1 addresses a race where multiple tasks can attempt to allocate the same
bucket due to lack of exclusion when the target bucket is not resident
in the key cache. Patch 2 fixes up an issue where the allocation cursor
is never properly updated, which made early bucket allocator performance
far worse than it should have been.

These have been tested in an ad hoc fashion on a kernel hacked up to use
the early bucket allocator as well as on CI via my test branch [1].
Thoughts, reviews, flames appreciated.

Brian

[1] https://evilpiepirate.org/~testdashboard/ci?branch=bfoster

Brian Foster (2):
  bcachefs: serialize on cached key in early bucket allocator
  bcachefs: update alloc cursor in early bucket allocator

 fs/bcachefs/alloc_foreground.c | 38 +++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

-- 
2.41.0

Reply via email to