From: Eric Sandeen <sandeen@sandeen.net>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: David Chinner <dgc@sgi.com>,
xfs@oss.sgi.com, Adrian Bunk <bunk@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: reduce stack usage in xfs_bmap_btalloc()
Date: Sat, 26 Apr 2008 13:54:54 -0500 [thread overview]
Message-ID: <48137A7E.4000202@sandeen.net> (raw)
In-Reply-To: <200804261651.02078.vda.linux@googlemail.com>
Denys Vlasenko wrote:
> Hi David,
>
> This patch reduces xfs_bmap_btalloc() stack usage by 50 bytes
> by moving part of its body into a helper function.
>
> This results in some variables not taking stack space in
> xfs_bmap_btalloc() anymore.
>
> The helper itself does not call anything stack-deep.
> Stack-deep call to xfs_alloc_vextent() happen
> in xfs_bmap_btalloc(), as before.
>
> Compile tested only.
>
> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
> --
> vda
>
Looks like a very good approach, it pushes a lot of large local vars off
into the helper.
There is one build-time problem if DEBUG is turned on:
if (args.fsbno != NULLFSBLOCK) {
ap->firstblock = ap->rval = args.fsbno;
ASSERT(nullfb || fb_agno == args.agno ||
(ap->low && fb_agno < args.agno));
in xfs_bmap_btalloc, which no longer has an fb_agno variable which the
ASSERT macro uses.
Thanks,
-Eric
next prev parent reply other threads:[~2008-04-26 18:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-26 14:51 [PATCH] xfs: reduce stack usage in xfs_bmap_btalloc() Denys Vlasenko
2008-04-26 18:54 ` Eric Sandeen [this message]
2008-04-26 23:05 ` Denys Vlasenko
2008-04-26 20:03 ` Christoph Hellwig
2008-04-26 23:45 ` Denys Vlasenko
2008-04-27 23:40 ` David Chinner
2008-04-27 23:57 ` Denys Vlasenko
2008-04-28 3:32 ` David Chinner
[not found] <200804261651.02078.vda.linux__2040.04651536724$1209223026$gmane$org@googlemail.com>
2008-04-26 20:02 ` Andi Kleen
2008-04-26 20:07 ` Christoph Hellwig
2008-04-26 20:26 ` Andi Kleen
2008-04-26 20:23 ` Christoph Hellwig
2008-04-28 0:06 ` Nathan Scott
2008-04-28 5:56 ` Christoph Hellwig
2008-04-28 10:32 ` Andi Kleen
2008-04-28 23:52 ` Nathan Scott
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=48137A7E.4000202@sandeen.net \
--to=sandeen@sandeen.net \
--cc=bunk@kernel.org \
--cc=dgc@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vda.linux@googlemail.com \
--cc=xfs@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox