Skip to content

bcachefs: early bucket allocator fixes

Brian Foster linux-bcachefs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bcachefs: serialize on cached key in early bucket allocatorfs/bcachefs/alloc_foreground.c+25 -30 replies
2/2bcachefs: update alloc cursor in early bucket allocatorfs/bcachefs/alloc_foreground.c+6 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] bcachefs: early bucket allocator fixes

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(-)
Signature · 1 line
2.41.0