All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] reduce large do_mount stack usage with noinlines
Date: Thu, 07 Feb 2008 17:08:19 -0600	[thread overview]
Message-ID: <47AB8F63.4020002@redhat.com> (raw)
In-Reply-To: <20080206152239.a2352d6d.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Wed, 06 Feb 2008 17:11:38 -0600
> Eric Sandeen <sandeen@redhat.com> 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.

Something like:

Index: linux-2.6.24-mm1/include/linux/compiler-gcc.h
===================================================================
--- linux-2.6.24-mm1.orig/include/linux/compiler-gcc.h
+++ linux-2.6.24-mm1/include/linux/compiler-gcc.h
@@ -53,3 +53,9 @@
 #define  noinline			__attribute__((noinline))
 #define __attribute_const__		__attribute__((__const__))
 #define __maybe_unused			__attribute__((unused))
+
+/*
+ * When gcc inlines multiple functions into a parent function,
+ * the stack space used sometimes increases excessively...
+ */
+#define noinline_stackspace	noinline


?

I couldn't think of a great name for it.  There are several noinline
users throughout the kernel with stackspace related comments, so if
desired, I could sprinkle this around.  I'm not very pleased with it
aesthetically though. :)

-Eric

  parent reply	other threads:[~2008-02-07 23:09 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 [this message]
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=47AB8F63.4020002@redhat.com \
    --to=sandeen@redhat.com \
    --cc=akpm@linux-foundation.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.