Re: [PATCH] scsi: Introduce sdev_printk_ratelimited to throttle frequent printk

From: Bart Van Assche
Date: Thu Mar 29 2018 - 19:56:48 EST


On Wed, 2018-03-28 at 16:43 +0800, Wen Yang wrote:
> There would be so many same lines printed by frequent prink if one
> disk went wrong, like,
> [ 546.185242] sd 0:1:0:0: rejecting I/O to offline device
> [ 546.185258] sd 0:1:0:0: rejecting I/O to offline device
> [ 546.185280] sd 0:1:0:0: rejecting I/O to offline device
> [ 546.185307] sd 0:1:0:0: rejecting I/O to offline device
> [ 546.185334] sd 0:1:0:0: rejecting I/O to offline device
> [ 546.185364] sd 0:1:0:0: rejecting I/O to offline device
> [ 546.185390] sd 0:1:0:0: rejecting I/O to offline device
> [ 546.185410] sd 0:1:0:0: rejecting I/O to offline device
> For slow serial console, the frequent prink may block the printk, and
> if spin_lock was acquired before the printk like in scsi_request_fn,
> that could trigger the watchdog.
>
> Relative disscussion can be found here,
^^^^^^^^
Related?

Anyway:

Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxx>