lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4A430406.2080904@redhat.com>
Date:	Wed, 24 Jun 2009 23:58:46 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	Theodore Tso <tytso@....edu>
CC:	linux-ext4@...r.kernel.org
Subject: Re: Need to potentially watch stack usage for ext4 and AIO...

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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ