From: Mike Anderson <andmike@us.ibm.com>
To: Luben Tuikov <luben@splentec.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] SCSI Core patches
Date: Wed, 8 Jan 2003 13:13:06 -0800 [thread overview]
Message-ID: <20030108211306.GG1112@beaverton.ibm.com> (raw)
In-Reply-To: <3E1C60D5.2070805@splentec.com>
Luben Tuikov [luben@splentec.com] wrote:
> >I'm arguing for a linked list of structs that hold the minimum data we
> >need to use them as a path - much like a scsi_device with the redundant
> >fields removed (and if needed it can also point to the actual
> >scsi_device). And then plugging this data (or a pointer) into a scsi_cmnd
> >for use by the LLDD.
>
> This may be an easier approach, but a scsi_cmnd stands for SCSI command.
>
but struct scsi_device currently stands for more than the LLDD
scsi_device. It stands for a block request queue, scsi mid data, and
scsi host device data.
While in the short term struct scsi_device already exists and appears to
be the right next progression to use. Future progression of abstraction
should look at some separation of the LLDD nexus device data and the
other struct scsi_device data. Maybe in the future part of struct scsi_device
will be a nexus handle given to the mid layer by the LLDD to represent
its object which will be plugged into the scsi_cmnd.
> Its a good thing to have multipathing represented as an ADT (abstract
> data type). Say something like a linked list of structs with
> cost/weight member and a pointer to an actual low-level device (the
> infrastructure
> will be more involved since multipathing will need to be notified
> when a device goes away, but read further...). Now this ADT may be embeded
> into a block device and char device structs -- i.e. highest hierarchy.
> (The assumption is that there won't be a device which will present
> a char and block interface at the same time.)
>
> Now since this ADT is embeded into the block/char device, we do get
> notification when it goes away. So this should be ok.
>
> The effect is that when write(fd, buf, count) is done, somewhere along
> the way *before* the actual physical device (ide,scsi,etc) is referenced
> multipathing has already been accomplished. This preserves as much as
> possible
> the current infrastructure of the kernel.
>
> So when a low-level device (LLD) says that it cannot satisfy the request,
> you *may* try another path.
>
> In effect a low-level device *as seen from the multipath code* is the tuple
> (PATH, DEVICE), and this is where a request is sent, i.e. to the tuple
> (PATH, DEVICE). Where for each PATH, there can be exactly one DEVICE, since
> a PATH describes a device (or access to it), but the opposite is not
> necessarily
> true. I.e. for each DEVICE there can be zero/one to many PATHs.
>
> >As long as we have an interface (function or macro), I'm not strongly
> >opposed to the above. We can keep the scsi_allocate_device (in dire need
> >of a new name), and just have it allocate and init (or not) any fields as
> >needed, so there is only one place to change the init of the allocated
> >scsi_cmnd.
>
> The SCSI Core has a well-defined funtion. I'm not so sure that we
> should muck it up with other well-defined functions, like multipathing.
>
I would counter that moving device and transport knowledge into the
upper level might also muck up that level.
While it is not difficult to link paths together inside an object it
becomes more difficult to make good decisions on how to use the paths
beyond simple fail-over. There are device and platform specific
characteristics that effect performance and error policy. These
personalities exist in multipath OS core support in AIX, MS, and
DYNIX/ptx and vendor specific multi-path support drivers available for
most OS's. While the implementation is unique to the OS environment the
need for path personalities is common.
These type of issues are touched on in the mid-multipath document.
> It is *inevitable* that multipathing will be moved up into the
> generic device char and block structs; sooner or later.
The inevitable hopefully will wait until we get a few more versions of
the mid-level patch out and discuss code specific pro / cons of mid vs
upper layer implementations.
-andmike
--
Michael Anderson
andmike@us.ibm.com
next prev parent reply other threads:[~2003-01-08 21:13 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-07 13:56 [PATCH] SCSI Core patches Luben Tuikov
2003-01-07 18:21 ` Patrick Mansfield
2003-01-07 19:23 ` Luben Tuikov
2003-01-07 20:33 ` Patrick Mansfield
2003-01-07 22:14 ` Luben Tuikov
2003-01-08 1:36 ` Patrick Mansfield
2003-01-08 5:13 ` Luben Tuikov
2003-01-11 18:12 ` Christoph Hellwig
2003-01-13 20:33 ` Patrick Mansfield
2003-01-13 21:30 ` Luben Tuikov
2003-01-14 18:49 ` Patrick Mansfield
2003-01-14 19:52 ` Luben Tuikov
2003-01-07 19:44 ` Doug Ledford
2003-01-07 22:53 ` Patrick Mansfield
2003-01-08 17:33 ` Luben Tuikov
2003-01-08 21:13 ` Mike Anderson [this message]
2003-01-10 12:35 ` Andre Hedrick
2003-01-10 17:06 ` James Bottomley
2003-01-10 19:23 ` Luben Tuikov
2003-01-10 20:05 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2003-01-14 16:19 Martin Peschke3
2003-01-14 16:51 ` Tony Battersby
2003-01-14 18:56 ` Patrick Mansfield
2003-01-14 20:01 Martin Peschke3
2003-01-14 20:17 ` Patrick Mansfield
2003-01-14 20:37 Martin Peschke3
2003-01-14 21:27 ` Patrick Mansfield
2003-01-14 21:29 Martin Peschke3
2003-01-14 22:16 ` Patrick Mansfield
2003-01-15 15:35 Martin Peschke3
2003-01-15 15:52 ` James Bottomley
2003-01-15 17:12 ` Mike Anderson
2003-01-15 17:40 ` Luben Tuikov
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=20030108211306.GG1112@beaverton.ibm.com \
--to=andmike@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=luben@splentec.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