problem: connection teardown is always blocked because host is busy doing work on other connections

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

 



From: Minh Duc Tran <MinhDuc.Tran@xxxxxxxxxxxxx>

This blocking is ok if we use software iscsi or iser where each
connection has a separate host.  In the case of hw iscsi offload, one
host could have hundreds of connections and some connections may have
IOs running which makes host->host_busy is always TRUE.  Another
problem is the host_lock taken here is disruptive to other
connections' EH paths.  Wouldn't using target_busy a better choice
here?

void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)
{
  .....
.......
        /*
         * Block until all in-progress commands for this connection
         * time out or fail.
         */
        for (;;) {
                spin_lock_irqsave(session->host->host_lock, flags);
                if (!atomic_read(&session->host->host_busy)) { /* OK
for ERL == 0 */
                        spin_unlock_irqrestore(session->host->host_lock, flags);
                        break;
                }
                spin_unlock_irqrestore(session->host->host_lock, flags);
                msleep_interruptible(500);
                iscsi_conn_printk(KERN_INFO, conn, "iscsi conn_destroy(): "
                                  "host_busy %d host_failed %d\n",
                                  atomic_read(&session->host->host_busy),
                                  session->host->host_failed);
                /*
                 * force eh_abort() to unblock
                 */
                wake_up(&conn->ehwait);
        }
--
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