[PATCH] drm/xe: Fix the gem shrinker name

Francois Dugast francois.dugast at intel.com
Fri May 9 07:17:35 UTC 2025


On Thu, May 08, 2025 at 01:29:31PM +0200, Thomas Hellström wrote:
> The xe buffer object shrinker name is visible in the
> <debugfs>/shrinker directory and most if not all other shinkers
> follow a naming convention that looks like
> <subsystem>-<driver>_<objects>:<unique>
> Follow the same convention for xe, changing the name to
> drm-xe_gem:<unique>.
> 
> Other shrinkers typically use the device node for <unique> but
> since drm drivers typically don't have a single unique device-
> node, instead use the unique name in the drm device.
> 
> Fixes: 00c8efc3180f ("drm/xe: Add a shrinker for xe bos")
> Cc: Matthew Brost <matthew.brost at intel.com>
> Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>

Reviewed-by: Francois Dugast <francois.dugast at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_shrinker.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_shrinker.c b/drivers/gpu/drm/xe/xe_shrinker.c
> index 8184390f9c7b..86d47aaf0358 100644
> --- a/drivers/gpu/drm/xe/xe_shrinker.c
> +++ b/drivers/gpu/drm/xe/xe_shrinker.c
> @@ -227,7 +227,7 @@ struct xe_shrinker *xe_shrinker_create(struct xe_device *xe)
>  	if (!shrinker)
>  		return ERR_PTR(-ENOMEM);
>  
> -	shrinker->shrink = shrinker_alloc(0, "xe system shrinker");
> +	shrinker->shrink = shrinker_alloc(0, "drm-xe_gem:%s", xe->drm.unique);
>  	if (!shrinker->shrink) {
>  		kfree(shrinker);
>  		return ERR_PTR(-ENOMEM);
> -- 
> 2.49.0
> 


More information about the Intel-xe mailing list