Re: [PATCH] reduce large do_mount stack usage with noinlines

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>
Date: Wednesday, February 6, 2008 - 6:55 pm

Andrew Morton wrote:


I think it does.

[linux-2.6.24-mm1]$ make fs/namespace.o > /dev/null
[linux-2.6.24-mm1]$ objdump -d fs/namespace.o | scripts/checkstack.pl
x86_64 | grep do_mount
0x00002307 do_mount [namespace.o]:                      616
[linux-2.6.24-mm1]$ quilt push
Applying patch patches/do_mount_stack
patching file fs/namespace.c

Now at patch patches/do_mount_stack
[linux-2.6.24-mm1]$ make fs/namespace.o > /dev/null
[linux-2.6.24-mm1]$ objdump -d fs/namespace.o | scripts/checkstack.pl
x86_64 | grep do_mount
0x00002a8b do_mount [namespace.o]:                      168

So clearly that one function is reduced.  But it's more than that....

I guess the problem is a() calls b() or c() or d() or e() or f(), and
gcc adds up all that stack usage, or seems to, and we get more like 6N
regardless of the path taken.

For example, 2 of the helper functions, once un-inlined, are:

0x00001fd9 do_move_mount [namespace.o]:                 288
0x00001e94 do_loopback [namespace.o]:                   168

so it looks like we do carry that baggage even if we go the
do_new_mount() path for example.


Ok, good point, will resend... want a comment on each, or perhaps above
do_mount?  I suppose on each.

-Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] reduce large do_mount stack usage with noinlines, Arjan van de Ven, (Thu Feb 7, 7:23 pm)
Re: [PATCH] reduce large do_mount stack usage with noinlines, Eric Sandeen, (Wed Feb 6, 6:55 pm)
Re: [PATCH] reduce large do_mount stack usage with noinlines, Arjan van de Ven, (Wed Feb 6, 6:54 pm)