All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Yan <yanaijie@huawei.com>
To: Wen Yang <wen.yang99@zte.com.cn>,
	jejb@linux.vnet.ibm.com, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bart.VanAssche@wdc.com, pmladek@suse.com,
	sergey.senozhatsky.work@gmail.com, tj@kernel.org,
	jiang.biao2@zte.com.cn, zhong.weidong@zte.com.cn,
	Tan Hu <tan.hu@zte.com.cn>
Subject: Re: [PATCH v3] scsi: Introduce sdev_printk_ratelimited to throttle frequent printk
Date: Tue, 3 Apr 2018 17:12:02 +0800	[thread overview]
Message-ID: <5AC34562.6030207@huawei.com> (raw)
In-Reply-To: <1522735480-159023-1-git-send-email-wen.yang99@zte.com.cn>


On 2018/4/3 14:04, Wen Yang wrote:
> There would be so many same lines printed by frequent printk 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 printk may be blocked for a
> long time, and if any spin_lock has been acquired before the printk
> like in scsi_request_fn, watchdog could be triggered.
>
> Related disscussion can be found here,
> https://bugzilla.kernel.org/show_bug.cgi?id=199003
> And Petr brought the idea to throttle the frequent printk, it's
> useless to print the same lines frequently after all.
>
> v2: fix some typos
> v3: limit the print only for the same device
>
> Suggested-by: Petr Mladek<pmladek@suse.com>
> Suggested-by: Sergey Senozhatsky<sergey.senozhatsky.work@gmail.com>
> Signed-off-by: Wen Yang<wen.yang99@zte.com.cn>
> Signed-off-by: Jiang Biao<jiang.biao2@zte.com.cn>
> Signed-off-by: Tan Hu<tan.hu@zte.com.cn>
> Reviewed-by: Bart Van Assche<bart.vanassche@wdc.com>
> CC: BartVanAssche<Bart.VanAssche@wdc.com>
> CC: Petr Mladek<pmladek@suse.com>
> CC: Sergey Senozhatsky<sergey.senozhatsky.work@gmail.com>
> CC: Martin K. Petersen<martin.petersen@oracle.com>
> CC: "James E.J. Bottomley"<jejb@linux.vnet.ibm.com>
> CC: Tejun Heo<tj@kernel.org>
> CC: JasonYan<yanaijie@huawei.com>

In my machine it works fine.

Tested-by: Jason Yan <yanaijie@huawei.com>

WARNING: multiple messages have this Message-ID (diff)
From: Jason Yan <yanaijie@huawei.com>
To: Wen Yang <wen.yang99@zte.com.cn>, <jejb@linux.vnet.ibm.com>,
	<martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<Bart.VanAssche@wdc.com>, <pmladek@suse.com>,
	<sergey.senozhatsky.work@gmail.com>, <tj@kernel.org>,
	<jiang.biao2@zte.com.cn>, <zhong.weidong@zte.com.cn>,
	Tan Hu <tan.hu@zte.com.cn>
Subject: Re: [PATCH v3] scsi: Introduce sdev_printk_ratelimited to throttle frequent printk
Date: Tue, 3 Apr 2018 17:12:02 +0800	[thread overview]
Message-ID: <5AC34562.6030207@huawei.com> (raw)
In-Reply-To: <1522735480-159023-1-git-send-email-wen.yang99@zte.com.cn>


On 2018/4/3 14:04, Wen Yang wrote:
> There would be so many same lines printed by frequent printk 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 printk may be blocked for a
> long time, and if any spin_lock has been acquired before the printk
> like in scsi_request_fn, watchdog could be triggered.
>
> Related disscussion can be found here,
> https://bugzilla.kernel.org/show_bug.cgi?id=199003
> And Petr brought the idea to throttle the frequent printk, it's
> useless to print the same lines frequently after all.
>
> v2: fix some typos
> v3: limit the print only for the same device
>
> Suggested-by: Petr Mladek<pmladek@suse.com>
> Suggested-by: Sergey Senozhatsky<sergey.senozhatsky.work@gmail.com>
> Signed-off-by: Wen Yang<wen.yang99@zte.com.cn>
> Signed-off-by: Jiang Biao<jiang.biao2@zte.com.cn>
> Signed-off-by: Tan Hu<tan.hu@zte.com.cn>
> Reviewed-by: Bart Van Assche<bart.vanassche@wdc.com>
> CC: BartVanAssche<Bart.VanAssche@wdc.com>
> CC: Petr Mladek<pmladek@suse.com>
> CC: Sergey Senozhatsky<sergey.senozhatsky.work@gmail.com>
> CC: Martin K. Petersen<martin.petersen@oracle.com>
> CC: "James E.J. Bottomley"<jejb@linux.vnet.ibm.com>
> CC: Tejun Heo<tj@kernel.org>
> CC: JasonYan<yanaijie@huawei.com>

In my machine it works fine.

Tested-by: Jason Yan <yanaijie@huawei.com>

  reply	other threads:[~2018-04-03  9:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03  6:04 [PATCH v3] scsi: Introduce sdev_printk_ratelimited to throttle frequent printk Wen Yang
2018-04-03  9:12 ` Jason Yan [this message]
2018-04-03  9:12   ` Jason Yan
2018-04-06  7:50 ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5AC34562.6030207@huawei.com \
    --to=yanaijie@huawei.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jiang.biao2@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=pmladek@suse.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=tan.hu@zte.com.cn \
    --cc=tj@kernel.org \
    --cc=wen.yang99@zte.com.cn \
    --cc=zhong.weidong@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.