Lines Matching full:shrink
22 * @shrink: Pointer to the mm shrinker.
30 struct shrinker *shrink; member
34 static struct xe_shrinker *to_xe_shrinker(struct shrinker *shrink) in to_xe_shrinker() argument
36 return shrink->private_data; in to_xe_shrinker()
90 xe_shrinker_count(struct shrinker *shrink, struct shrink_control *sc) in xe_shrinker_count() argument
92 struct xe_shrinker *shrinker = to_xe_shrinker(shrink); in xe_shrinker_count()
152 static unsigned long xe_shrinker_scan(struct shrinker *shrink, struct shrink_control *sc) in xe_shrinker_scan() argument
154 struct xe_shrinker *shrinker = to_xe_shrinker(shrink); in xe_shrinker_scan()
230 shrinker->shrink = shrinker_alloc(0, "drm-xe_gem:%s", xe->drm.unique); in xe_shrinker_create()
231 if (!shrinker->shrink) { in xe_shrinker_create()
239 shrinker->shrink->count_objects = xe_shrinker_count; in xe_shrinker_create()
240 shrinker->shrink->scan_objects = xe_shrinker_scan; in xe_shrinker_create()
241 shrinker->shrink->private_data = shrinker; in xe_shrinker_create()
242 shrinker_register(shrinker->shrink); in xe_shrinker_create()
255 shrinker_free(shrinker->shrink); in xe_shrinker_destroy()