Re: [PATCH] reduce large do_mount stack usage with noinlines

From: Arjan van de Ven
Date: Wed Feb 06 2008 - 17:55:36 EST


On Wed, 6 Feb 2008 14:34:57 -0800
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

>
> Does the patch actually help? I mean, if a() calls b() and both use N
> bytes of locals, our worst-case stack usage remains ~2N whether or
> not b() was inlined in a()? In fact, uninlining makes things a
> little worse due to callframe stuff.

it gets interesting at the three-way..
if a() calls b() and then calls c(), and they all use N,
the total usage is now 3N not 2N.

(although current gcc is already somewhat smarter about this, and 3N might actually be 2N for some cases)
--
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/