]> www.infradead.org Git - users/dwmw2/linux.git/commit
bcachefs: key cache can now allocate from pending
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 13 Jun 2024 19:35:47 +0000 (15:35 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 9 Sep 2024 13:41:47 +0000 (09:41 -0400)
commit5f1929f1f077d3997ab8cd4a8136aad304b0e9df
tree3d8928c85db75bb8ae228a036470a904f5f08328
parentf2bfe7e83765f3bd84382cc75d8ac3ca619de39a
bcachefs: key cache can now allocate from pending

btree_trans objects can hold the btree_trans_barrier srcu read lock for
an extended amount of time (they shouldn't, but it's difficult to
guarantee).

the srcu barrier blocks memory reclaim, so to avoid too many stranded
key cache items, this uses the new pending_rcu_items to allocate from
pending items - like we did before, but now without a global lock on the
key cache.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_key_cache.c
fs/bcachefs/btree_key_cache_types.h
fs/bcachefs/btree_types.h