All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Theodore Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Need to potentially watch stack usage for ext4 and AIO...
Date: Wed, 24 Jun 2009 11:39:02 -0500	[thread overview]
Message-ID: <4A4256A6.7070707@redhat.com> (raw)
In-Reply-To: <4A42513C.6020607@redhat.com>

Eric Sandeen wrote:
> Theodore Tso wrote:

...

>> I can see some things we can do to optimize stack usage; for example,
>> struct ext4_allocation_request is allocated on the stack, and the
>> structure was laid out without any regard to space wastage caused by
>> alignment requirements.  That won't help on x86 at all, but it will
>> help substantially on x86_64 (since x86_64 requires that 8 byte
>> variables must be 8-byte aligned, where as x86_64 only requires 4 byte
>> alignment, even for unsigned long long's).  But it's going have to be
>> a whole series of incremental improvements; I don't see any magic
>> bullet solution to our stack usage.
> 
> XFS forces gcc to not inline any static function; it's extreme, but
> maybe it'd help here too.

Giving a blanket noinline treatment to mballoc.c yields some significant
stack savings:

-ext4_mb_free_blocks 200
+ext4_mb_free_blocks 184

-ext4_mb_init_cache 232
+ext4_mb_init_cache 136

-ext4_mb_regular_allocator 232
+ext4_mb_regular_allocator 104

-ext4_mb_new_blocks 104
(drops below 100 bytes)

-Eric


  reply	other threads:[~2009-06-24 16:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 17:59 Need to potentially watch stack usage for ext4 and AIO Theodore Ts'o
2009-06-20  1:46 ` Eric Sandeen
2009-06-21  0:49   ` Theodore Tso
2009-06-24 16:15     ` Eric Sandeen
2009-06-24 16:39       ` Eric Sandeen [this message]
2009-06-25  0:05         ` Theodore Tso
2009-06-25  0:32           ` Eric Sandeen
2009-06-25  4:58             ` Eric Sandeen

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=4A4256A6.7070707@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.