All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Eric Sandeen <sandeen@sandeen.net>
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: Sun, 27 Apr 2008 01:05:17 +0200	[thread overview]
Message-ID: <200804270105.18096.vda.linux@googlemail.com> (raw)
In-Reply-To: <48137A7E.4000202@sandeen.net>

On Saturday 26 April 2008 20:54, Eric Sandeen wrote:
> > 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>
> 
> 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.

Do you want me to rework and resend the patch?
--
vda

  reply	other threads:[~2008-04-26 23:06 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
2008-04-26 23:05   ` Denys Vlasenko [this message]
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=200804270105.18096.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=bunk@kernel.org \
    --cc=dgc@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    --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 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.