Lines Matching full:shrink
645 static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink, in bch2_btree_key_cache_scan() argument
648 struct bch_fs *c = shrink->private_data; in bch2_btree_key_cache_scan()
724 static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink, in bch2_btree_key_cache_count() argument
727 struct bch_fs *c = shrink->private_data; in bch2_btree_key_cache_count()
752 shrinker_free(bc->shrink); in bch2_fs_btree_key_cache_exit()
805 struct shrinker *shrink; in bch2_fs_btree_key_cache_init() local
820 shrink = shrinker_alloc(0, "%s-btree_key_cache", c->name); in bch2_fs_btree_key_cache_init()
821 if (!shrink) in bch2_fs_btree_key_cache_init()
823 bc->shrink = shrink; in bch2_fs_btree_key_cache_init()
824 shrink->count_objects = bch2_btree_key_cache_count; in bch2_fs_btree_key_cache_init()
825 shrink->scan_objects = bch2_btree_key_cache_scan; in bch2_fs_btree_key_cache_init()
826 shrink->batch = 1 << 14; in bch2_fs_btree_key_cache_init()
827 shrink->seeks = 0; in bch2_fs_btree_key_cache_init()
828 shrink->private_data = c; in bch2_fs_btree_key_cache_init()
829 shrinker_register(shrink); in bch2_fs_btree_key_cache_init()