Lines Matching full:shrink
593 static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink, in bch2_btree_key_cache_scan() argument
596 struct bch_fs *c = shrink->private_data; in bch2_btree_key_cache_scan()
672 static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink, in bch2_btree_key_cache_count() argument
675 struct bch_fs *c = shrink->private_data; in bch2_btree_key_cache_count()
700 shrinker_free(bc->shrink); in bch2_fs_btree_key_cache_exit()
754 struct shrinker *shrink; in bch2_fs_btree_key_cache_init() local
769 shrink = shrinker_alloc(0, "%s-btree_key_cache", c->name); in bch2_fs_btree_key_cache_init()
770 if (!shrink) in bch2_fs_btree_key_cache_init()
772 bc->shrink = shrink; in bch2_fs_btree_key_cache_init()
773 shrink->count_objects = bch2_btree_key_cache_count; in bch2_fs_btree_key_cache_init()
774 shrink->scan_objects = bch2_btree_key_cache_scan; in bch2_fs_btree_key_cache_init()
775 shrink->batch = 1 << 14; in bch2_fs_btree_key_cache_init()
776 shrink->seeks = 0; in bch2_fs_btree_key_cache_init()
777 shrink->private_data = c; in bch2_fs_btree_key_cache_init()
778 shrinker_register(shrink); in bch2_fs_btree_key_cache_init()