bcachefs: Btree key cache instrumentation
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 20 Apr 2024 18:49:22 +0000 (14:49 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 8 May 2024 21:29:20 +0000 (17:29 -0400)
commit5147b9ae768758982b196d1b259e6372e328955e
tree6da266b587c28905f152a4e12f4d9fa6f541526c
parente4f2c4dfeeaeb70164967aa4abfa1190f7e61781
bcachefs: Btree key cache instrumentation

It turns out the btree key cache shrinker wasn't actually reclaiming
anything, prior to the previous patch. This adds instrumentation so that
if we have further issues we can see what's going on.

Specifically, sysfs internal/btree_key_cache is greatly expanded with
new counters, and the SRCU sequence numbers of the first 10 entries on
each pending freelist, and we also add trigger_btree_key_cache_shrink
for testing without having to prune all the system caches.

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