2007-08-01 10:04:39

by NeilBrown

[permalink] [raw]
Subject: Re: [PATCH][RFC] 4K stacks default, not a debug thing any more...?

On Wednesday August 1, [email protected] wrote:
>
> The other issue is with the layered IO design - no matter what we
> configure the stack size to, it is still possible to create a set of
> translation layers that will cause it to crash regularly: XFS on
> dm_crypt on loop on XFS on dm_crypt on loop on ad infinitum.

No, this does not use indefinite stack.

loop will schedule each request to be handled by a kernel thread, so
requests to 'loop' are serialised, never stacked.

In 2.6.22, generic_make_request detects and serialises recursive calls,
so unlimited recursion is not possible there either.

It is still possible to do
dm on dm on dm on dm on md on md on md on md

and calls to ->issue_flush_fn or ->unplug_fn could use an arbitrarily
large amount of stack. But the stack usage of each stage is very
small so it is unlikely to be a problem (though it should still be
fixed).

NeilBrown


2007-08-10 04:51:28

by Dan Merillat

[permalink] [raw]
Subject: Re: [PATCH][RFC] 4K stacks default, not a debug thing any more...?

On 8/1/07, Neil Brown <[email protected]> wrote:

> No, this does not use indefinite stack.
>
> loop will schedule each request to be handled by a kernel thread, so
> requests to 'loop' are serialised, never stacked.
>
> In 2.6.22, generic_make_request detects and serialises recursive calls,
> so unlimited recursion is not possible there either.

Is that saying "before 2.6.22, a read/write on a deeply layered device
would use a lot of stack?"