public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Daniel Phillips <phillips@phunq.net>
Cc: "Ph. Marek" <philipp.marek@bmlv.gv.at>, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Stacking bio support
Date: Tue, 11 Mar 2008 14:38:18 +0200	[thread overview]
Message-ID: <47D67D3A.5030208@panasas.com> (raw)
In-Reply-To: <200803110507.10858.phillips@phunq.net>

On Tue, Mar 11 2008 at 14:07 +0200, Daniel Phillips <phillips@phunq.net> wrote:
> On Tuesday 11 March 2008 04:33, Ph. Marek wrote:
>> Win32 has IRP stacks, which do mostly the same AFAIU.
>> 	http://msdn2.microsoft.com/en-us/library/ms796144.aspx
> 
> That seems to be filling a similar need all right, though it looks
> like a fancier (read: clunkier) solution.
> 
>> 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)
> 
> Yes, I reallocate.  I do not currently register these with the
> emergency pool, good spotting.  I intend to do all such reallocations
> with GFP_MEMALLOC (out of tree deadlock-prevention allocation flag) and
> rely on (out of tree) bio throttling to prevent the memalloc reserve
> from being exhausted.  Hopefully these things will be in-tree in due
> course.
> 

I guess that is not worse then current implementation. So many slab
allocations saved, lets you have a few of your own.
>From passed experience, though, relocation is changed to a link-list
(chaining) of sorts the first time relocation starts to hit consistently.
for 1-in-100 case it can stay, any higher then that better allocate more
space and chain it to the old. It also fits better with the pools paradigm.
I would leave the reallocation for a while but make sure it is all hidden
behind the right API to be easily enhanced later on.
 
> Incidentally, the bio stack should make the bio throttling somewhat
> more elegant, a nice circular effect.
> 
>> I don't say that it's impossible ... just that some "interesting" things will 
>> await you. 
> 
> Tell me about it :-)
> 
>> 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.)
> 
> I think you are right.  In fact, I thought about this for a couple of
> years, always getting hung up at exactly that point.  When I stopped
> trying to see the stack as a fixed size object with preassigned frames,
> the rest fell into place.  One obvious problem with the pre-assigned
> approach: you don't always know the path ahead of time that a bio
> will take to a physical device.
>  
>> But I sure hope you succeed!
> 
> Thankyou for your useful comments.  I do need to present a solution
> complete with deadlock prevention.  I guess the bio code will end up
> simpler there too, because with the memalloc anti-deadlock approach,
> the array of bio mempools can go away.
> 
> Regards,
> 
> Daniel

Me too, I'll be watching out on your progress, It looks like the building
blocks of some very advanced possibilities. ("Pure Data")

Do you have a public git tree that we can inspect from time to time.

Cheers 
Boaz

  reply	other threads:[~2008-03-11 12:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11 10:52 [RFC] Stacking bio support Daniel Phillips
2008-03-11 11:33 ` Ph. Marek
2008-03-11 12:07   ` Daniel Phillips
2008-03-11 12:38     ` Boaz Harrosh [this message]
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=47D67D3A.5030208@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philipp.marek@bmlv.gv.at \
    --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