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

Denys Vlasenko
2008-04-26T23:45:57Z

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