lkml.org 
[lkml]   [2020]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scsi: core: Rate limit "rejecting I/O" messages
From
Date
On Wed, 2020-04-08 at 19:10 +0200, Daniel Wagner wrote: 
> +#define sdev_printk_ratelimited(l, sdev, fmt, a...)
> \
> +({
> \
> + static DEFINE_RATELIMIT_STATE(_rs,
> \
> + DEFAULT_RATELIMIT_INTERVAL,
> \
> + DEFAULT_RATELIMIT_BURST);
> \
> +
> \
> + if (__ratelimit(&_rs))
> \
> + sdev_prefix_printk(l, sdev, NULL, fmt, ##a);

If we do go with a ratelimit architecture for sdev_printk, I would
think the limit has to be per sdev, because we wouldn't want a burst of
messages on one sdev to suppress messages on another.

For this particular issue, I suppose one target can have many sdevs, so
you'd prefer to rate limit by target?

James

\
 
 \ /
  Last update: 2020-04-08 19:36    [W:0.062 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site