Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe: Fix the gem shrinker name

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@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Link: https://lore.kernel.org/r/20250508112931.3347-1-thomas.hellstrom@linux.intel.com

+1 -1
+1 -1
drivers/gpu/drm/xe/xe_shrinker.c
··· 227 227 if (!shrinker) 228 228 return ERR_PTR(-ENOMEM); 229 229 230 - shrinker->shrink = shrinker_alloc(0, "xe system shrinker"); 230 + shrinker->shrink = shrinker_alloc(0, "drm-xe_gem:%s", xe->drm.unique); 231 231 if (!shrinker->shrink) { 232 232 kfree(shrinker); 233 233 return ERR_PTR(-ENOMEM);