summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-06-07 01:12:11 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2024-06-10 19:17:16 +0200
commitbc65e98e68dac2c0b588e67ea75ee8674c208fc7 (patch)
treed7b6efce697bd3ccd15d9bc698f55044b5fde595 /fs
parentbcachefs: Enable automatic shrinking for rhashtables (diff)
downloadlinux-bc65e98e68dac2c0b588e67ea75ee8674c208fc7.tar.xz
linux-bc65e98e68dac2c0b588e67ea75ee8674c208fc7.zip
bcachefs: increase key cache shrinker batch size
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/btree_key_cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index fb731d52b1ec..eaf012ddca08 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -1026,9 +1026,10 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
if (!shrink)
return -BCH_ERR_ENOMEM_fs_btree_cache_init;
bc->shrink = shrink;
- shrink->seeks = 0;
shrink->count_objects = bch2_btree_key_cache_count;
shrink->scan_objects = bch2_btree_key_cache_scan;
+ shrink->batch = 1 << 14;
+ shrink->seeks = 0;
shrink->private_data = c;
shrinker_register(shrink);
return 0;