2018-04-02 05:30:51

by Sergey Senozhatsky

[permalink] [raw]
Subject: Re: 答复: Re: [PATCH v2 ] scsi: Introduc e sdev_printk_ratelimited to throttlefrequent printk

On (04/02/18 13:14), [email protected] wrote:
>
> > It's true that this print for the same device is useless. But it's
> > useful for different devices. Is it possible to limit the print only
> > for the same device?
>
> In our scene, it's ?just for the same device (q->queuedata), Thanks.

Yes, what Jason meant was that rate limit struct is shared by different call
sites - including scsi_request_fn() from different devices.

If device1->scsi_request_fn()->sdev_printk_ratelimited() causes printk rate
limit, then messages from device2->scsi_request_fn()->sdev_printk_ratelimited()
may be lost entirely, unless you have enough of them.

-ss


2018-04-02 06:10:04

by Jason Yan

[permalink] [raw]
Subject: Re: 答复: Re: [PATCH v2] scsi: Introduce sd ev_printk_ratelimited to throttlefrequent printk



On 2018/4/2 13:29, Sergey Senozhatsky wrote:
> On (04/02/18 13:14), [email protected] wrote:
>>
>> > It's true that this print for the same device is useless. But it's
>> > useful for different devices. Is it possible to limit the print only
>> > for the same device?
>>
>> In our scene, it's just for the same device (q->queuedata), Thanks.
>
> Yes, what Jason meant was that rate limit struct is shared by different call
> sites - including scsi_request_fn() from different devices.
>
> If device1->scsi_request_fn()->sdev_printk_ratelimited() causes printk rate
> limit, then messages from device2->scsi_request_fn()->sdev_printk_ratelimited()
> may be lost entirely, unless you have enough of them.
>
> -ss
>

Yes, that's exactly what I mean.

Thanks,

Jason

> .
>