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 23:58:46 -0500 [thread overview]
Message-ID: <4A430406.2080904@redhat.com> (raw)
In-Reply-To: <4A42C5BA.8020804@redhat.com>
Eric Sandeen wrote:
> I had found some tools once to do static callchain analysis & graph
> them, maybe time to break it out again.
codeviz was the tool; getting it to work is fiddly. But here, for
example, are some of the callers of ext4_mb_init_cache() (one of the
functions at the bottom of your deep chain), with stack usage and
piggish ones highlighted in red:
http://sandeen.fedorapeople.org/ext4/ext4_mb_init_cache_callers.png
This is actually only analysis of the functions in mballoc.c, but that's
relevant for the static / noinline decisions.
The stack usage values were after my attempt to get gcc to inline
-nothing- at all.
So there you can see that ext4_mb_regular_allocator by itself uses 104
bytes, but calls several other functions which get inlined normally:
ext4_mb_try_best_found 16
ext4_mb_try_by_goal 56
ext4_mb_load_buddy 24
ext4_mb_init_group 24
Without all the noinlining, ext4_mb_regular_allocator uses 232 bytes ...
104+16+56+24+24 = 224 is close to that.
On the flip side here are the functions called by
ext4_mb_init_cache_callees within mballoc.c:
http://sandeen.fedorapeople.org/ext4/ext4_mb_init_cache_callees.png
Here too I think you can see that if much of that gets inlined, it'll
bloat that function.
A bit more analysis like this might yield some prudent changes ... but
it's tedious. :)
-Eric
prev parent reply other threads:[~2009-06-25 4:58 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
2009-06-25 0:05 ` Theodore Tso
2009-06-25 0:32 ` Eric Sandeen
2009-06-25 4:58 ` Eric Sandeen [this message]
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=4A430406.2080904@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.