Message ID | 41f16eed-cc12-ad7d-45ae-bb67815d1728@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | i915: change pr_info to pr_info_ratelimited | expand |
Hi Mikulaus, On Mon, Aug 05, 2024 at 04:29:52PM +0200, Mikulas Patocka wrote: > 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. Checkpatch complains here: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?) > 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 <mpatocka@redhat.com> > Reported-by: Zdenek Kabelac <zkabelac@redhat.com> The sender's SoB should go at the end of the tag list. > > --- > 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); This is not properly aligned. Now a wrapping of up to 100 characters is accepted (however 80 is preferred). Patch looks good. Thanks, Andi
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);
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 <mpatocka@redhat.com> Reported-by: Zdenek Kabelac <zkabelac@redhat.com> --- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)