From: Michael Reed <mdr@sgi.com>
To: James.Smart@Emulex.Com
Cc: Mike Christie <michaelc@cs.wisc.edu>,
linux-scsi@vger.kernel.org,
Andrew Vasquez <andrew.vasquez@qlogic.com>,
aherrman@de.ibm.com, Christoph Hellwig <hch@infradead.org>,
duane.grigsby@qlogic.com, "Moore,
Eric Dean" <Eric.Moore@lsil.com>,
"Shirron, Stephen" <Stephen.Shirron@lsil.com>,
Jeremy Higdon <jeremy@sgi.com>
Subject: Re: [RFC] fc transport: extensions for fast fail and dev loss
Date: Tue, 25 Jul 2006 16:15:13 -0500 [thread overview]
Message-ID: <44C689E1.7030709@sgi.com> (raw)
In-Reply-To: <44C667AD.8090604@emulex.com>
James Smart wrote:
>
>
> Mike Christie wrote:
>>
>> So is the fast_io_fail_tmo callback the terminate_rport_io callback?
>
> Yes.
> When fast_io_fail_tmo expires, it calls the terminate_rport_io() callback.
>
>> If
>> so, are we supposed to unblock the rport/session/target from
>> fc_timeout_fail_rport_io
>
> No... don't unblock.
>
>> and call into the LLD and the LLD will set some
>> bit (or maybe check some rport/session/target/scsi_device bit) so that
>> incoming IO and IO sitting in the driver will be failed with something
>> like DID_BUS_BUSY so it goes to the upper layers?
>
> The way this is managed in the fc transport is - the LLD calls the
> transport when it establishes connectivity (an "add" call), and when it
> loses connectivity (a "delete" call). When the transport receives the
> delete call, it changes the rport state, blocks the rport, and starts the
> dev_loss timeout (and potentially the fast_io_fail_tmo if < dev_loss).
> If the LLD makes the add call prior to dev_loss expiring, then updates
> the state, and unblocks the rport. If dev_loss expires, it updates
> state again (essentially the true deleted state) and tears down the
> target tree.
>
> To deal with requests being received while blocked, etc - the LLD's use
> a helper routine (fc_remote_port_chkready()), which validates the rport
> state, and if not valid (e.g. blocked or removed) returns the appropriate
> status to return to the midlayer. If blocked, it returns DID_IMM_RETRY.
> If deleted, it returns DID_NO_CONNECT.
>
> What the above never dealt with was the i/o already in the driver. The
> driver always had the option to terminate the active i/o when the loss
> of connectivity occurred, or it could just wait for it to timeout, etc
> and be killed that way. This patch added the callback at dev_loss_tmo
> to guarantee i/o is killed, and added the fast_io_fail_tmo if you
> wanted a faster guarantee. If fast_io_fail_tmo expires and the callback
> is called - it just kills the outstanding i/o and does nothing to the
> rport's blocked state.
Haven't most drivers / board firmware generally cleaned up any outstanding
i/o at the time (or shortly thereafter) of the fc_remote_port_delete()
call? I would think it reasonable to just require that the driver clean
up the i/o after calling fc_remote_port_delete(). Is there a significant
reason to keep the i/o alive in the driver? The rport has just been
deleted.... Would this eliminate the need for the callback? If the
driver implements this, could it just have a NULL callback routine?
Mike
>
>> I think I only the
>> unblock happen on success or fc_starget_delete, so IO in the driver
>> looks like it can get failed upwards but IO sitting in the queue sits
>> there until fc_rport_final_delete or success.
>
> Yeah - essentially this is correct. I hope the above read that way.
> I'm also hoping the iSER folks are reading this to get the general
> feel of what's happening with block, dev_loss, etc.
>
>>
>> If that is correct, what about a new device state? When the fail fast
>> tmo expires we can set the device to the new state, run the queue and
>> incoming IO or IO in the request_queue marked with FAILFAST can be
>> failed upwards by scsi-ml.
>>
>> I just woke up though :)
>
> Sounds reasonable. It is adding a new semantic to what was meant by
> fast_fail - but it's in line with our goal. The goal was to terminate
> i/o so that they could be quick rescheduled on a different path rather
> than wait (what may be a long time) for the dev_loss connectivity
> timer to fire. Makes sense you would want to make new i/o requests
> bound by that same window.
>
> -- james s
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next prev parent reply other threads:[~2006-07-25 21:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 18:45 [RFC] fc transport: extensions for fast fail and dev loss James Smart
2006-07-25 17:12 ` Mike Christie
2006-07-25 18:49 ` James Smart
2006-07-25 21:15 ` Michael Reed [this message]
2006-07-26 3:33 ` James Smart
2006-07-26 9:20 ` Christoph Hellwig
2006-07-26 16:35 ` James Smart
2006-08-08 17:54 ` [RFC] [Last Rites] " James Smart
2006-08-08 21:56 ` Michael Reed
2006-08-08 22:15 ` Michael Reed
2006-08-09 15:31 ` Michael Reed
2006-08-10 16:38 ` James Smart
2006-08-09 17:36 ` Christoph Hellwig
2006-08-10 16:17 ` James Smart
2006-08-10 20:01 ` Mike Christie
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=44C689E1.7030709@sgi.com \
--to=mdr@sgi.com \
--cc=Eric.Moore@lsil.com \
--cc=James.Smart@Emulex.Com \
--cc=Stephen.Shirron@lsil.com \
--cc=aherrman@de.ibm.com \
--cc=andrew.vasquez@qlogic.com \
--cc=duane.grigsby@qlogic.com \
--cc=hch@infradead.org \
--cc=jeremy@sgi.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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