Messages in this thread | | | Subject | Re: [PATCH] scsi: core: Rate limit "rejecting I/O" messages | From | James Bottomley <> | Date | Wed, 08 Apr 2020 10:36:03 -0700 |
| |
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
| |