Lines Matching full:shrink
667 static unsigned long bch_mca_scan(struct shrinker *shrink, in bch_mca_scan() argument
670 struct cache_set *c = shrink->private_data; in bch_mca_scan()
734 static unsigned long bch_mca_count(struct shrinker *shrink, in bch_mca_count() argument
737 struct cache_set *c = shrink->private_data; in bch_mca_count()
755 if (c->shrink) in bch_btree_cache_free()
756 shrinker_free(c->shrink); in bch_btree_cache_free()
831 c->shrink = shrinker_alloc(0, "md-bcache:%pU", c->set_uuid); in bch_btree_cache_alloc()
832 if (!c->shrink) { in bch_btree_cache_alloc()
837 c->shrink->count_objects = bch_mca_count; in bch_btree_cache_alloc()
838 c->shrink->scan_objects = bch_mca_scan; in bch_btree_cache_alloc()
839 c->shrink->seeks = 4; in bch_btree_cache_alloc()
840 c->shrink->batch = c->btree_pages * 2; in bch_btree_cache_alloc()
841 c->shrink->private_data = c; in bch_btree_cache_alloc()
843 shrinker_register(c->shrink); in bch_btree_cache_alloc()