From: James Bottomley <James.Bottomley@suse.de>
To: Brian King <brking@linux.vnet.ibm.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
linux-ide <linux-ide@vger.kernel.org>,
Robert Jennings <rcj@linux.vnet.ibm.com>,
Wayne Boyer <wayneb@linux.vnet.ibm.com>
Subject: Re: [PATCH 0/2] convert libsas to the libata new eh
Date: Wed, 26 Jan 2011 09:08:51 -0500 [thread overview]
Message-ID: <1296050931.4893.9.camel@mulgrave.site> (raw)
In-Reply-To: <4D3F1CC6.5080208@linux.vnet.ibm.com>
On Tue, 2011-01-25 at 12:56 -0600, Brian King wrote:
> On 01/23/2011 09:41 AM, James Bottomley wrote:
> > The bad news is that this is a pretty horrific conversion. Because of
> > the amount of control the new eh wants (and the slew of monolithic
> > assumptions it makes), the entire error handler routine has to be sliced
> > apart and sewn back together to make it callable as part of an existing
> > error handler (rather than trying to do everything on its own).
> >
> > The even worse news is that unless you have an existing strategy
> > handler, you can't make use of this. That means that ipr is
> > unconvertable in its current form. Given the two really nasty options:
> > give ipr its own error handler via its own transport class, or attach
> > ipr to libsas and let it do the work, I'd choose the latter.
>
> I've got a patch set that's been sitting collecting dust for quite some time
> that implements yet another option. The basic idea is that we move away from
> the idea of having a single scsi_host for the entire SAS adapter, but
> rather have one for the SAS devices and one for each SATA rphy.
So, as I said already, I think this is a pretty nasty hack. A host
represents a single attachment to the bus (usually a card). We have a
lot of logic that crawls up the device tree looking for the host. If we
have multiple hosts in the hierarchy, that logic will always find the
dummy one.
> This allows us to use libata's EH pretty much as is, but does introduce
> some issues to solve:
>
> 1. Adapter queue depth. Since we have multiple scsi_hosts for a single
> HBA, we lose the adapter queue depth tracking done by scsi core.
> Anything in block that can help us here?
> 2. Locking gets messy since we have a lock for each sata rphy as well
> as one for the sas scsi_host.
>
> There were some other smaller issues as well. I liked the idea of moving
> to multiple scsi_host's since that eliminates the issue of userspace polling an
> empty CD drive causing EH to get invoked and quiescing all SAS I/O as well,
> but it does result in potentially a lot of scsi_hosts getting created.
I think better might be to move the eh thread functionality into block.
What libata really wants is one eh thread per phy. It gets this by
completely abusing the idea of a host. There's actually good reasons
why most of our modern HBAs would like one eh per port ... which would
amount to per-phy on ata which can't do wide ports. If we allowed the
driver to determine the correct level for this, and block to provide the
machinery, everyone should get what they want, and libata could dispense
with its current corruption of multiple SCSI hosts per physical bus
attachment.
James
next prev parent reply other threads:[~2011-01-26 14:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 15:41 [PATCH 0/2] convert libsas to the libata new eh James Bottomley
2011-01-23 15:42 ` [PATCH 1/2] libata: separate error handler into usable components James Bottomley
2011-01-23 15:44 ` [PATCH 2/2] libsas: convert to libata new error handler James Bottomley
2011-01-24 21:12 ` [PATCH 0/2] convert libsas to the libata new eh Jeff Garzik
2011-01-24 21:16 ` James Bottomley
2011-01-25 18:56 ` Brian King
2011-01-26 14:08 ` James Bottomley [this message]
2011-01-26 17:46 ` Jeff Garzik
2011-01-26 17:55 ` James Bottomley
2011-02-13 19:18 ` James Bottomley
2011-02-15 7:03 ` Jeff Garzik
2011-02-15 14:15 ` James Bottomley
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=1296050931.4893.9.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=brking@linux.vnet.ibm.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rcj@linux.vnet.ibm.com \
--cc=wayneb@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).