diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-01 19:20:36 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-01 21:14:02 -0400 |
commit | e2a316b3cc45a1198f3feb18707403bb7f0cbc15 (patch) | |
tree | 9e274feee0dcebf4ef57203e2cfe2e7399e9da08 /fs/bcachefs/alloc_foreground.c | |
parent | ba947ecd39ea0e6a6f6f1101f99611fc30943bcb (diff) | |
download | linux-e2a316b3cc45a1198f3feb18707403bb7f0cbc15.tar.gz linux-e2a316b3cc45a1198f3feb18707403bb7f0cbc15.tar.bz2 linux-e2a316b3cc45a1198f3feb18707403bb7f0cbc15.zip |
bcachefs: BCH_WATERMARK_interior_updates
This adds a new watermark, higher priority than BCH_WATERMARK_reclaim,
for interior btree updates. We've seen a deadlock where journal replay
triggers a ton of btree node merges, and these use up all available open
buckets and then interior updates get stuck.
One cause of this is that we're currently lacking btree node merging on
write buffer btrees - that needs to be fixed as well.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index 214b15c84d1f..a1fc30adf912 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -188,8 +188,10 @@ long bch2_bucket_alloc_new_fs(struct bch_dev *ca) static inline unsigned open_buckets_reserved(enum bch_watermark watermark) { switch (watermark) { - case BCH_WATERMARK_reclaim: + case BCH_WATERMARK_interior_updates: return 0; + case BCH_WATERMARK_reclaim: + return OPEN_BUCKETS_COUNT / 6; case BCH_WATERMARK_btree: case BCH_WATERMARK_btree_copygc: return OPEN_BUCKETS_COUNT / 4; |