From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: wen.yang99@zte.com.cn
Cc: Bart.VanAssche@wdc.com, sergey.senozhatsky.work@gmail.com,
pmladek@suse.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, jiang.biao2@zte.com.cn,
zhong.weidong@zte.com.cn, tan.hu@zte.com.cn
Subject: Re: 答复: Re: [PATCH] scsi: Replace sdev_printk with printk_deferred to avoid
Date: Wed, 28 Mar 2018 11:44:22 +0900 [thread overview]
Message-ID: <20180328024422.GA1352@jagdpanzerIV> (raw)
In-Reply-To: <201803281029555635678@zte.com.cn>
On (03/28/18 10:29), wen.yang99@zte.com.cn wrote:
> Hello Bart,
>
> We have a detailed discussion of the problem.
> Sergey Senozhatsky, Petr and many people have made a lot of efforts about
> it.
> Please see this link:
> https://bugzilla.kernel.org/show_bug.cgi?id=199003
>
> 1, Petr suggests that it should be modified in this way:
> IMHO, printing the same message so many times is useless. Therefore
> some throttling would make sense. If we want to keep sdev_printk(),
The thing with retelimiting is that - yes, we do less printks but we still
do them under queue spin_lock.
So I was thinking about something like below [a quick-n-dirty workaround]
---
drivers/scsi/scsi_lib.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 0dfec0dedd5e..6c930fbdd24c 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1825,9 +1825,13 @@ static void scsi_request_fn(struct request_queue *q)
break;
if (unlikely(!scsi_device_online(sdev))) {
+ scsi_kill_request(req, q);
+ spin_unlock_irq(q->queue_lock);
+
sdev_printk(KERN_ERR, sdev,
"rejecting I/O to offline device\n");
- scsi_kill_request(req, q);
+
+ spin_lock_irq(q->queue_lock);
continue;
}
prev parent reply other threads:[~2018-03-28 2:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 8:50 [PATCH] scsi: Replace sdev_printk with printk_deferred to avoid Wen Yang
2018-03-27 0:27 ` Bart Van Assche
2018-03-27 14:31 ` Bart Van Assche
[not found] ` <201803281029555635678@zte.com.cn>
2018-03-28 2:44 ` Sergey Senozhatsky [this message]
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=20180328024422.GA1352@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.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=tan.hu@zte.com.cn \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox