From: Eric Sandeen <sandeen@redhat.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] reduce large do_mount stack usage with noinlines
Date: Wed, 06 Feb 2008 17:01:32 -0600 [thread overview]
Message-ID: <47AA3C4C.6080004@redhat.com> (raw)
In-Reply-To: <20080206145439.4ef971f2@laptopd505.fenrus.org>
Arjan van de Ven wrote:
> On Wed, 6 Feb 2008 14:34:57 -0800
> Andrew Morton <akpm@linux-foundation.org> 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.
*nod*
It'd be nice if it could be max of (a,b,c) though. Or maybe compilers
don't work that way. :)
> (although current gcc is already somewhat smarter about this, and 3N might actually be 2N for some cases)
on x86, gcc 4.1.2, do_mount goes from 360 to 112 bytes w/ the patch I sent.
with gcc 4.3, it goes from 364 to 104.
-ERic
next prev parent reply other threads:[~2008-02-06 23:01 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 [this message]
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
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=47AA3C4C.6080004@redhat.com \
--to=sandeen@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.