* scsi_error: improve the recovery latency for timeouted scsi cmds
@ 2013-03-20 3:24 Ren Mingxin
0 siblings, 0 replies; only message in thread
From: Ren Mingxin @ 2013-03-20 3:24 UTC (permalink / raw)
To: James Bottomley; +Cc: Tejun Heo, Christoph Hellwig, SCSI
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-20 3:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 3:24 scsi_error: improve the recovery latency for timeouted scsi cmds Ren Mingxin
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).