From: David Chinner <dgc@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: David Chinner <dgc@sgi.com>, xfs-dev <xfs-dev@sgi.com>,
xfs-oss <xfs@oss.sgi.com>
Subject: Re: review: allocate alloc args
Date: Tue, 24 Apr 2007 08:32:57 +1000 [thread overview]
Message-ID: <20070423223257.GM32602149@melbourne.sgi.com> (raw)
In-Reply-To: <20070423212201.GB13572@infradead.org>
On Mon, Apr 23, 2007 at 10:22:01PM +0100, Christoph Hellwig wrote:
> On Thu, Apr 19, 2007 at 05:32:16PM +1000, David Chinner wrote:
> >
> > Save some stack space in the critical allocator paths
> > by allocating the xfs_alloc_arg_t structures (104 bytes
> > on 64bit, 88 bytes on 32bit systems) rather than placing
> > them on the stack.
> >
> > There can be more than one of these structures on the stack
> > through the critical allocation path (e.g. xfs_bmap_btalloc()
> > and xfs_alloc_fix_freelist()) so there are significant
> > savings to be had here...
>
> I don't like doing even more dynamic allocations that deep
> down in the stack.
I'm not a big fan of it either, but I don't really see any other
option here. We need a bunch of temporary space for structures
*somewhere*, and if there isn't enough stack space then it's
got to come frm somewhere else.
> Can we try another approach and see if
> we really need the full structure in all places but could
> rather pass down a few arguments or a smaller structure instead?
We use all the variables in the xfs_bmalloca_t structure when it is
passed, and we use most (all?) of the args in xfs_alloc_args_t in
the critical spots so I'm not sure whether this approach could gain
us much.
Given that both you and Nathan has expressed concern about these
two alloc arg patches, I'm going to hold off doing anythinng with
them. We're caught between a rock and a hard place here - if we
use too much stack and then can't dynamically allocate safely then
I don't really see that there is that much we can do to reduce stack
usage....
> I've done some work on that in the dir good with quite good results
> a while ago (and yes, I need to bring it up to date and send it out)
Sounds interesting - I'll have a closer look at this in the
allocator context.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2007-04-23 22:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-19 7:32 review: allocate alloc args David Chinner
2007-04-23 21:22 ` Christoph Hellwig
2007-04-23 22:32 ` David Chinner [this message]
2007-04-24 17:27 ` Eric Sandeen
2007-04-25 23:11 ` David Chinner
2007-04-26 1:41 ` Eric Sandeen
2007-04-26 18:06 ` Mike Gigante
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=20070423223257.GM32602149@melbourne.sgi.com \
--to=dgc@sgi.com \
--cc=hch@infradead.org \
--cc=xfs-dev@sgi.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