From: "Ph. Marek" <philipp.marek@bmlv.gv.at>
To: Daniel Phillips <phillips@phunq.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] Stacking bio support
Date: Tue, 11 Mar 2008 12:33:21 +0100 [thread overview]
Message-ID: <200803111233.21386.philipp.marek@bmlv.gv.at> (raw)
In-Reply-To: <200803110352.41479.phillips@phunq.net>
Hello Daniel!
On Dienstag, 11. März 2008, Daniel Phillips wrote:
> 3: bio.stack-2.6.23.12
>
> This adds an internal stack to each struct bio and introduces two new
> bio operations:
>
> data = bio_push(bio, worksize, endio);
> data = bio_pop(bio);
>
> The first is used before submitting a bio and the second is used in the
> endio handler, which gives the driver a nice way to share context
> between the two events. If the requested amount stack space is not
> available in the bio, the bio stack is automatically extended.
...
> (I learned from Andreas Dilger last month at FAST that Lustre already
> implements a mechanism along these lines.)
Win32 has IRP stacks, which do mostly the same AFAIU.
http://msdn2.microsoft.com/en-us/library/ms796144.aspx
How do you handle the reallocation?
- If you don't do it (but rely on the fact that the initial allocation is
enough), you might end up with NO_MORE_IRP_STACK_LOCATIONS
http://msdn2.microsoft.com/en-us/library/ms793675.aspx
- If you do reallocate, the allocations have to register themselves in
the emergency pool (see the current thread about swapping over NFS)
I don't say that it's impossible ... just that some "interesting" things will
await you.
> Currently the stack size in the bio is set to zero and is always
> extended on the first bio_push. An upcoming revision will add a
> mechanism for a block driver to specify the initial amount of stack
> space it knows will always be needed. Some time further in the future,
> a mechanism for discovering the stack requirements of several block
> devices in a stack may be added, so that a typical bio submission is
> able to traverse the entire stack with only a single bio allocation.
That's different from the Win32 way AFAIK - there it's defined that every
layer *has* to use its own stack location. (But it's been some time since I
needed that, so I might be wrong.)
But I sure hope you succeed!
Regards,
Phil
next prev parent reply other threads:[~2008-03-11 11:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 10:52 Daniel Phillips
2008-03-11 11:33 ` Ph. Marek [this message]
2008-03-11 12:07 ` Daniel Phillips
2008-03-11 12:38 ` Boaz Harrosh
2008-04-10 13:04 ` Daniel Phillips
2008-04-10 13:34 ` Boaz Harrosh
2008-03-14 13:59 ` Alan D. Brunelle
2008-03-14 14:04 ` [RFC] Stacking bio support - patch 1/4 for 2.6.23.17 (stable) Alan D. Brunelle
2008-03-14 19:41 ` Daniel Phillips
2008-03-14 14:04 ` [RFC] Stacking bio support Alan D. Brunelle
2008-03-14 14:06 ` Alan D. Brunelle
2008-03-14 14:05 ` [RFC] Stacking bio support - patch 3/4 for 2.6.23.17 (stable) Alan D. Brunelle
2008-03-14 14:05 ` [RFC] Stacking bio support - patch 4/4 " Alan D. Brunelle
2008-03-16 21:38 ` [RFC] Stacking bio support Daniel Phillips
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=200803111233.21386.philipp.marek@bmlv.gv.at \
--to=philipp.marek@bmlv.gv.at \
--cc=linux-kernel@vger.kernel.org \
--cc=phillips@phunq.net \
/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
all inboxes | Powered by JetHome®