[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1586367363.7606.34.camel@linux.ibm.com>
Date: Wed, 08 Apr 2020 10:36:03 -0700
From: James Bottomley <jejb@...ux.ibm.com>
To: Daniel Wagner <dwagner@...e.de>, linux-scsi@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH] scsi: core: Rate limit "rejecting I/O" messages
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
Powered by blists - more mailing lists