From: Eric Sandeen <sandeen@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, rth@redhat.com
Subject: Re: [PATCH] reduce large do_mount stack usage with noinlines
Date: Fri, 08 Feb 2008 10:54:09 -0600 [thread overview]
Message-ID: <47AC8931.50704@redhat.com> (raw)
In-Reply-To: <p73myqb2y09.fsf@bingen.suse.de>
Andi Kleen wrote:
> Andrew Morton <akpm@linux-foundation.org> writes:
>>> */
>>> -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
>
> In theory it should be already fixed; iirc Richard H. (cc'ed) added
> code for this somewhere in 4.x. Don't quite remember which x, likely
> either 1 or 2.
>
> e.g. if I do a quick test here on gcc 4.2 then it definitely
> reuses stack slots between inlines. As you can see only ~100 bytes
> are allocated, not ~200.
On gcc 4.1.2 and 4.3 (fedora flavors) I don't see it re-used in
do_mount, though... *shrug*
-Eric
next prev parent reply other threads:[~2008-02-08 17:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 22:13 [PATCH] reduce large do_mount stack usage with noinlines Eric Sandeen
2008-02-06 22:34 ` Andrew Morton
2008-02-06 22:54 ` Arjan van de Ven
2008-02-06 23:01 ` Eric Sandeen
2008-02-06 22:55 ` Eric Sandeen
2008-02-06 23:11 ` Eric Sandeen
2008-02-06 23:22 ` Andrew Morton
2008-02-06 23:34 ` Eric Sandeen
2008-02-06 23:46 ` Andrew Morton
2008-02-07 23:08 ` Eric Sandeen
2008-02-07 23:23 ` Arjan van de Ven
2008-02-07 23:26 ` Andrew Morton
2008-02-08 16:50 ` Andi Kleen
2008-02-08 16:54 ` Eric Sandeen [this message]
2008-02-08 17:23 ` Al Viro
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=47AC8931.50704@redhat.com \
--to=sandeen@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@redhat.com \
/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