Re: [PATCH] xfs: reduce stack usage in xfs_bmap_btalloc()

From: Denys Vlasenko
Date: Sat Apr 26 2008 - 19:46:24 EST


On Saturday 26 April 2008 22:03, Christoph Hellwig wrote:
> On Sat, Apr 26, 2008 at 04:51:02PM +0200, 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.
>
> I think this is a good idea, although I'd rather split the function at
> a local boundary. The patch below (which passes xfsqa) does that
> by splitting out the handling of the most complicated nullfb case
> out. It probably won't help reducing stack useage as much as yours,
> but it helps beeing able to read the code a little better.

It saves only 16 bytes of stack.
--
vda
--
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/