Re: multipath_busy() stalls IO due to scsi_host_is_busy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 17 2012 at  5:09am -0400,
Jun'ichi Nomura <j-nomura@xxxxxxxxxxxxx> wrote:

> Hi,
> 
> On 05/16/12 21:28, Bernd Schubert wrote:
> > Looking through the call chain, I see the underlying problem seems to be in scsi_host_is_busy().
> > 
> >> static inline int scsi_host_is_busy(struct Scsi_Host *shost)
> >> {
> >>     if ((shost->can_queue > 0 && shost->host_busy >= shost->can_queue) ||
> >>         shost->host_blocked || shost->host_self_blocked)
> >>         return 1;
> >>
> >>     return 0;
> >> }
> 
> multipath_busy() was introduced because, without that,
> a request would be prematurely sent down to SCSI,
> lose the chance of additional merges and result in
> bad performance.
> 
> However, when it is target/host that is busy, I think dm should
> send the request down and let SCSI, which has better knowledge
> about the shared resource, do appropriate starvation control.
> 
> Could you try the attached patch?
> 
> ---
> Jun'ichi Nomura, NEC Corporation
> 
> If sdev is not busy but starget and/or host is busy,
> it is better to accept a request from stacking driver.
> Otherwise, the stacking device could be starved by other device
> sharing the same target/host.

Great suggestion.

It should be noted that DM mpath is the only caller of blk_lld_busy (and
scsi_lld_busy).  So even though this patch may _seem_ like the tail
(mpath) wagging the dog (SCSI), it is reasonable to change SCSI's
definition of a LLD being "busy" if it benefits multipath.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux