public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Ravi Anand <ravi.anand@qlogic.com>
Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>,
	"james.bottomley@suse.de" <james.bottomley@suse.de>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 04/11] qla4xxx: set correct value in sess->recovery_tmo
Date: Tue, 22 Jun 2010 13:12:39 -0500	[thread overview]
Message-ID: <4C20FD17.5040809@cs.wisc.edu> (raw)
In-Reply-To: <AC192039-EAE9-4625-8AF0-C4B9E1C8D47D@qlogic.com>

On 06/21/2010 06:35 PM, Ravi Anand wrote:
> Mike,
>
> Actually, that's not true.
>

I think you are misunderstanding me.


> When we call iscsi_block_session(), session is already down and we are not
> sending any NOP.
>

I never said you were going to send a nop. I was saying that you guys 
said the ka_timeout is used to detemine when to send a nop.

You guys said:
<start>
It's time interval between connection keep-alive ping. When a connection
is idle for the connection keep-alive timeout interval, the ISP4xxx
sends an iSCSI NOP PDU to the other device that is part of the connection.
When the device responses to the NOP PDU, the connection remains open.
When the device fails to respond, the ISP4010 closes the connection
and informs the driver that the connection has gone down.
<end>

so I was saying if the session is down, nops cannot be sent so 
ka_timeout does not come into play at that time (it has already expired).

> FW closes connection after ka_timeout expire at FW level.  Then FW
> sends notification to driver for DDB state change which basically indicates
> that session is in failed state . After that driver mark device *missing* and call iscsi_block_sesstion().
> At this point iSCSI connection is already closed,  so FW is not sending
> any iSCSI NOP to target.

Yeah, that is what I was saying.

>
> We are just using value of ka_timeout in sess->recovery_tmo because
> we want to wait for some time for connection to comeback else
> mark device dead.

I agree 100% that you should have a timer to wait for the session to 
come back. libiscsi has the noop settings which is equivalent to your 
ka_timeout and then for the recovery_tmo we have the 
replacement/recovery_tmo setting. My point is that there is no 
requirement and no good reason to set sess->recovery_tmo based on the 
same setting.

I am saying ka_timeout is not used for the same operations as 
session->recovery_tmo. They handle two separate events, and should be 
two separate settings. Once ka_timeout has expired we have marked the 
session as down, and now we are on the recovery stage, so a new timer 
comes into play.

So ka_timeout is used to determine when we want to mark a session as bad.

session->recovery_tmo is used to determine when we want give up on the 
session.

They should be 2 different settings since testing a SAN/port can take 
different times than doing recovery of a session.

  reply	other threads:[~2010-06-22 18:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-16 20:51 [PATCH 04/11] qla4xxx: set correct value in sess->recovery_tmo Vikas Chaudhary
2010-06-18 22:58 ` Mike Christie
2010-06-21 23:35   ` Ravi Anand
2010-06-22 18:12     ` Mike Christie [this message]
2010-06-22 20:55       ` Ravi Anand
2010-06-23 19:21         ` Mike Christie
2010-07-06  5:20           ` Vikas Chaudhary

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=4C20FD17.5040809@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=james.bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ravi.anand@qlogic.com \
    --cc=vikas.chaudhary@qlogic.com \
    /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