Re: [PATCH] Reduce stack usage in acct.c

From: Jörn Engel
Date: Thu Mar 31 2005 - 10:13:40 EST


On Wed, 30 March 2005 23:39:40 -0800, Yum Rayan wrote:
>
> Before patch
> ------------
> check_free_space - 128
> do_acct_process - 105
>
> After patch
> -----------
> check_free_space - 36
> do_acct_process - 44

It is always nice to see enthusiams, but in your case it might be a
bit misguided. None of the functions you worked on appear to be real
problems wrt. stack usage.

But if you have time to tackle some of these functions, that may make
a real difference:

http://wh.fh-wedel.de/~joern/stackcheck.2.6.11

In principle, all recursive paths should consume as little stack as
possible. Or the recursion itself could be avoided, even better. And
some of the call chains with ~3k of stack consumption may be
problematic on other platforms, like the x86-64. Taking care of those
could result in smaller stacks for the respective platform.

Jörn

--
When I am working on a problem I never think about beauty. I think
only how to solve the problem. But when I have finished, if the
solution is not beautiful, I know it is wrong.
-- R. Buckminster Fuller
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/