From: Ren Mingxin <renmx@cn.fujitsu.com>
To: James Bottomley <JBottomley@Parallels.com>
Cc: Tejun Heo <tj@kernel.org>, Christoph Hellwig <hch@infradead.org>,
SCSI <linux-scsi@vger.kernel.org>
Subject: scsi_error: improve the recovery latency for timeouted scsi cmds
Date: Wed, 20 Mar 2013 11:24:49 +0800 [thread overview]
Message-ID: <51492C01.504@cn.fujitsu.com> (raw)
Hi,
Please let me ask one question about improving the recovery latency
for timeouted scmds:
In the functions 'scsi_eh_wakeup()' & 'scsi_error_handler()', there
are two same condition judgements which ensure the number of active
scmds equals to the number of failed scmds:
void scsi_eh_wakeup(struct Scsi_Host *shost)
{
if (shost->host_busy == shost->host_failed)
wake_up_process(shost->ehandler);
}
int scsi_error_handler(void *data)
{
while (!kthread_should_stop()) {
if ((shost->host_failed == 0 &&
shost->host_eh_scheduled == 0) ||
shost->host_failed != shost->host_busy) {
schedule();
continue;
}
....
}
....
}
I think the original reason for waking up eh thread until all scmds
complete/fail may be in case of more overhead produced by threads
waking up time after time, right?
But in the below condition, the strategy above seems not appropriate:
If a scmd is issued and stuck and another scmd is issued, scsi eh
detects a timeout of the first scmd, but has to wait for the second
one to be timedout/completed. Which means the first timeouted scmds
couldn't be handled in time.
This may be fatal to a certain extent(the critical system especially).
So, please let me know the starting point for the wakeup strategy in
eh. We'd investigate further based on your comments. Any suggestions
will be appreciated.
Thanks,
Ren
reply other threads:[~2013-03-20 3:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=51492C01.504@cn.fujitsu.com \
--to=renmx@cn.fujitsu.com \
--cc=JBottomley@Parallels.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tj@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).