1

bcachefs: increase key cache shrinker batch size

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-06-06 19:12:11 -04:00
parent 5ae67abcdf
commit bc65e98e68

View File

@ -1026,9 +1026,10 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
if (!shrink) if (!shrink)
return -BCH_ERR_ENOMEM_fs_btree_cache_init; return -BCH_ERR_ENOMEM_fs_btree_cache_init;
bc->shrink = shrink; bc->shrink = shrink;
shrink->seeks = 0;
shrink->count_objects = bch2_btree_key_cache_count; shrink->count_objects = bch2_btree_key_cache_count;
shrink->scan_objects = bch2_btree_key_cache_scan; shrink->scan_objects = bch2_btree_key_cache_scan;
shrink->batch = 1 << 14;
shrink->seeks = 0;
shrink->private_data = c; shrink->private_data = c;
shrinker_register(shrink); shrinker_register(shrink);
return 0; return 0;