All of lore.kernel.org
 help / color / mirror / Atom feed
* problem: connection teardown is always blocked because host is busy doing work on other connections
@ 2015-06-19  1:09 Minh Tran
  2015-06-19  6:16 ` Mike Christie
  0 siblings, 1 reply; 3+ messages in thread
From: Minh Tran @ 2015-06-19  1:09 UTC (permalink / raw)
  To: linux-scsi; +Cc: Minh Duc Tran

From: Minh Duc Tran <MinhDuc.Tran@avagotech.Com>

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);
        }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem: connection teardown is always blocked because host is busy doing work on other connections
  2015-06-19  1:09 problem: connection teardown is always blocked because host is busy doing work on other connections Minh Tran
@ 2015-06-19  6:16 ` Mike Christie
  2015-06-19  6:20   ` Minh Duc Tran
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Christie @ 2015-06-19  6:16 UTC (permalink / raw)
  To: Minh Tran, linux-scsi, sony.john

On 6/18/15, 8:09 PM, Minh Tran wrote:
> From: Minh Duc Tran <MinhDuc.Tran@avagotech.Com>
>
> 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?
>

Do you talk to John :) I had told him to do that a couple days ago when 
you guys emailed me about this offlist.

However, I think Christoph wants to remove target_busy so you need to 
think of something else. I think you could take the session eh_mutex in 
the libiscsi session and conn teardown functions and rely on refcounting 
and state checks in the eh callouts.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem: connection teardown is always blocked because host is busy doing work on other connections
  2015-06-19  6:16 ` Mike Christie
@ 2015-06-19  6:20   ` Minh Duc Tran
  0 siblings, 0 replies; 3+ messages in thread
From: Minh Duc Tran @ 2015-06-19  6:20 UTC (permalink / raw)
  To: Mike Christie; +Cc: linux-scsi, Sony John

Hi Mike,
I am unaware of your talk with Sony about this issue.  Anyways, I will
leave it for Sony to follow it through.

Thanks.
-Minh

On Thu, Jun 18, 2015 at 11:16 PM, Mike Christie <michaelc@cs.wisc.edu> wrote:
> On 6/18/15, 8:09 PM, Minh Tran wrote:
>>
>> From: Minh Duc Tran <MinhDuc.Tran@avagotech.Com>
>>
>> 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?
>>
>
> Do you talk to John :) I had told him to do that a couple days ago when you
> guys emailed me about this offlist.
>
> However, I think Christoph wants to remove target_busy so you need to think
> of something else. I think you could take the session eh_mutex in the
> libiscsi session and conn teardown functions and rely on refcounting and
> state checks in the eh callouts.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-19  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-19  1:09 problem: connection teardown is always blocked because host is busy doing work on other connections Minh Tran
2015-06-19  6:16 ` Mike Christie
2015-06-19  6:20   ` Minh Duc Tran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.