Re: [PATCH 00/13] Support follow_link in RCU-walk. - V2

From: Al Viro
Date: Mon Mar 16 2015 - 15:14:54 EST


On Mon, Mar 16, 2015 at 03:43:19PM +1100, NeilBrown wrote:
> Hi Al,
> I believe this series addresses all your concerns about
> my first attempt.
> The first patch results in nameidata being almost completely
> localized to namei.c :-) It also highlights out-of-date
> documentation in automount-support.txt :-(
>
> It also exposes (and removes) some ... interesting code in lustre.
> I'm not sure how safe it is to remove that.... I didn't think
> recursive symlinks used extra stack.

Recursive nested symlinks *do* use extra stack; it's not in fs code, though.
make fs/namei.s and check link_path_walk; AFAICS, on amd64 it's 192 bytes per
level, on sparc64 - 256, sparc32 and ppc32 - 144, ppc64 - obscenely fat 336...

It's more that lustre is an extreme stack hog; call its methods on slightly
deeper stack and you are screwed. I don't _know_ if that's pure paranoia -
might very well be. OTOH, it might be not paranoid enough. OTTH, if it
manages to survive 5 levels on 4K stack, it ought to survive 8 levels on 8K
one; if 3 times the footprint of link_path_walk pushes the total by more 4K,
there's no way in hell to fit 5 times that footprint into 4K stack, nevermind
the rest of call chain...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/