bcachefs: bch2_btree_cache_scan() improvement
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 25 Sep 2022 18:49:14 +0000 (14:49 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:41 +0000 (17:09 -0400)
commitc36ff038fd3af6092e356cb4ed1c79a041b77b19
tree14484a7b3d2027364026224c8bc9999bde06aa6c
parentc6cf49a95ac7aea3450cacb66b7de1d46671deeb
bcachefs: bch2_btree_cache_scan() improvement

We're still seeing OOM issues caused by the btree node cache shrinker
not sufficiently freeing memory: thus, this patch changes the shrinker
to not exit if __GFP_FS was not supplied.

Instead, tweak btree node memory allocation so that we never invoke
memory reclaim while holding the btree node cache lock.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_cache.c