Zdenek Kabelac reported that his syslog was flooded with many messages: Purging GPU memory, 0 pages freed, 0 pages still pinned, 2029 pages left available.
It happened when he was testing the VDO device mapper module (which requires a lot of kernel memory). This commit changes the message to be ratelimited, so that it doesn't spam the syslog. Signed-off-by: Mikulas Patocka <[email protected]> Reported-by: Zdenek Kabelac <[email protected]> --- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c =================================================================== --- linux-2.6.orig/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c 2024-03-11 12:53:59.000000000 +0100 +++ linux-2.6/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c 2024-08-05 16:07:49.000000000 +0200 @@ -375,7 +375,7 @@ i915_gem_shrinker_oom(struct notifier_bl spin_unlock_irqrestore(&i915->mm.obj_lock, flags); if (freed_pages || available) - pr_info("Purging GPU memory, %lu pages freed, " + pr_info_ratelimited("Purging GPU memory, %lu pages freed, " "%lu pages still pinned, %lu pages left available.\n", freed_pages, unevictable, available);
