Lines Matching refs:shrink
661 static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink, in bch2_btree_key_cache_scan() argument
664 struct bch_fs *c = shrink->private_data; in bch2_btree_key_cache_scan()
740 static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink, in bch2_btree_key_cache_count() argument
743 struct bch_fs *c = shrink->private_data; in bch2_btree_key_cache_count()
768 shrinker_free(bc->shrink); in bch2_fs_btree_key_cache_exit()
821 struct shrinker *shrink; in bch2_fs_btree_key_cache_init() local
836 shrink = shrinker_alloc(0, "%s-btree_key_cache", c->name); in bch2_fs_btree_key_cache_init()
837 if (!shrink) in bch2_fs_btree_key_cache_init()
839 bc->shrink = shrink; in bch2_fs_btree_key_cache_init()
840 shrink->count_objects = bch2_btree_key_cache_count; in bch2_fs_btree_key_cache_init()
841 shrink->scan_objects = bch2_btree_key_cache_scan; in bch2_fs_btree_key_cache_init()
842 shrink->batch = 1 << 14; in bch2_fs_btree_key_cache_init()
843 shrink->seeks = 0; in bch2_fs_btree_key_cache_init()
844 shrink->private_data = c; in bch2_fs_btree_key_cache_init()
845 shrinker_register(shrink); in bch2_fs_btree_key_cache_init()