From: Jens Axboe <axboe@suse.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
Jeff Garzik <jeff@garzik.org>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
Tejun Heo <htejun@gmail.com>, Andrew Morton <akpm@osdl.org>
Subject: Re: [Fwd: [RFT] major libata update]
Date: Wed, 17 May 2006 19:55:42 +0200 [thread overview]
Message-ID: <20060517175541.GT4197@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0605171036140.10823@g5.osdl.org>
On Wed, May 17 2006, Linus Torvalds wrote:
>
>
> On Wed, 17 May 2006, James Bottomley wrote:
> >
> > This is one of the questions. Currently block has no concept of "host".
>
> That's good.
>
> I don't understand why you'd ever _want_ a concept of "host". The whole
> concept is broken and unnecessary. At no point should you even need to map
> from request to host, but if you do, you don't need to introduce any
> generic "host" notion, you can do it easily per-queue.
Maybe "host" is the wrong word, but there is some usefulness to look at
dependencies of queues.
> > All it knows about are queues (which may be per host or per device
> > depending on the implementation). Do we need to introduce the concept
> > of something like queue grouping (a sort of lightweight infrastructure
> > that could be used by the underlying transport to implement a host
> > concept without introducing hosts at the block layer)?
>
> We already have it. Each queue has its lock pointer. If you want to have a
> "host" notion, you do it by just setting the queue lock to point to the
> host lock (since if they are dependent, you'd _better_ share the lock
> between the queues anyway), and then you do
>
> struct myhost_struct *queue_host(struct request_queue *queue)
> {
> return container_of(queue->queue_lock, myhost_struct, host_lock);
> }
>
> and there are no changes necessary to the queue layer.
That gets you the "parent" structure (or "host") for the queues, but it
doesn't help you with managing them. One issue could be a shared tag
queue - we already solved that by sharing the tag map between the
queues, but that still allows on queue to deplete more entries that it
should be allowed to. And so on.
> You can do it other ways too: the "struct kobject" in the queue obviously
> contains a pointer to the parent of the queue, and that might well be your
> "host" object. Again, exact same deal, except now you'd use
>
> container_of(queue->kobj.parent, myhost_struct, host_kobject);
>
> instead. Entirely up to you.
>
> The whole fixation with "host" in the SCSI layer is a bug, I think. What
> does it matter, really? And when do you actually have a "request_queue"
> entry without already knowing which controller it is connected to (ie why
> do you even need that mapping)?
Some devices need serialization between them, and the only way to
achieve that currently is by sharing a queue. But that fails eg at the
io scheduler level - and other places also assume a 1:1 mapping between
queues and devices. And this you cannot do generically right now, and
it's one thing I would like to handle.
--
Jens Axboe
next prev parent reply other threads:[~2006-05-17 17:54 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4468B596.9090508@garzik.org>
[not found] ` <1147789098.3505.19.camel@mulgrave.il.steeleye.com>
2006-05-16 15:41 ` [Fwd: [RFT] major libata update] Jeff Garzik
2006-05-16 15:51 ` James Bottomley
2006-05-16 16:06 ` Jeff Garzik
2006-05-16 16:30 ` James Bottomley
2006-05-16 16:39 ` Jeff Garzik
2006-05-16 21:55 ` Luben Tuikov
2006-05-16 21:32 ` Luben Tuikov
2006-05-16 16:08 ` Tejun Heo
2006-05-16 16:13 ` Tejun Heo
2006-05-16 16:29 ` James Bottomley
2006-05-16 16:37 ` Jeff Garzik
2006-05-16 16:39 ` Tejun Heo
2006-05-16 16:50 ` James Bottomley
2006-05-16 17:07 ` Tejun Heo
2006-05-16 17:09 ` Jeff Garzik
2006-05-16 19:58 ` Christoph Hellwig
2006-05-16 20:02 ` Jeff Garzik
2006-05-16 21:28 ` James Bottomley
2006-05-18 3:27 ` Tejun Heo
2006-05-19 12:07 ` [PATCH] SCSI: make scsi_implement_eh() generic API for SCSI transports Tejun Heo
2006-05-16 16:12 ` [Fwd: [RFT] major libata update] Jeff Garzik
2006-05-16 16:38 ` James Bottomley
2006-05-16 16:57 ` Jeff Garzik
2006-05-17 7:37 ` Jens Axboe
2006-05-17 15:06 ` Jeff Garzik
2006-05-17 15:50 ` James Bottomley
2006-05-17 15:58 ` James Smart
2006-05-17 16:17 ` Jeff Garzik
2006-05-17 17:53 ` James Bottomley
2006-05-17 22:08 ` Jeff Garzik
2006-05-17 22:15 ` Jeff Garzik
2006-05-17 17:47 ` Linus Torvalds
2006-05-17 17:55 ` Jens Axboe [this message]
2006-05-17 22:04 ` Linus Torvalds
2006-05-17 22:12 ` Jeff Garzik
2006-05-17 21:41 ` Jeff Garzik
2006-05-17 21:52 ` Douglas Gilbert
2006-05-17 22:20 ` Linus Torvalds
2006-05-18 3:04 ` Luben Tuikov
2006-05-17 16:05 ` Douglas Gilbert
2006-05-17 17:37 ` Jens Axboe
2006-05-17 21:58 ` Jeff Garzik
2006-05-18 7:21 ` Jens Axboe
2006-05-16 18:28 ` Luben Tuikov
2006-05-16 18:15 ` 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=20060517175541.GT4197@suse.de \
--to=axboe@suse.de \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@osdl.org \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@osdl.org \
/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).