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

From: Andrew Morton
Date: Wed Feb 06 2008 - 18:23:30 EST


On Wed, 06 Feb 2008 17:11:38 -0600
Eric Sandeen <sandeen@xxxxxxxxxx> wrote:

> /*
> * recursively change the type of the mountpoint.
> + * noinline this do_mount helper to save do_mount stack space.
> */
> -static int do_change_type(struct nameidata *nd, int flag)
> +static noinline int do_change_type(struct nameidata *nd, int flag)

What we could do here is defined a new noinline_because_of_stack_suckiness
and use that. Reasons:

- self-documenting, so we don't need to comment each site

- can be made a no-op for suitable __GNUC__ values if gcc ever fixes this

- our children we can go through and delete them all when nobody is using
the offending gcc versions any more.

what thinkest thou?
--
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/