From: Nathan Scott <nscott@aconex.com>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: review: allocate bmapi args
Date: Fri, 20 Apr 2007 14:41:57 +1000 [thread overview]
Message-ID: <1177044117.6273.203.camel@edge> (raw)
In-Reply-To: <20070419082331.GW48531920@melbourne.sgi.com>
On Thu, 2007-04-19 at 18:23 +1000, David Chinner wrote:
> ...
> > Are you sure this is legit though?
>
> It *must* be. We already rely on being able to do substantial
> amounts of allocation in this path....
Not necessarily, we only sometimes (for some values of BMAPI flags
I mean) do memory allocations.
> ...
> We modify the incore extent list as it grows and shrinks in this
> path. It is critical that we are able to allocate at least small
Well, not always. For cases where we modify the extents we must
call in here with Steve's funky I'm-in-a-transaction process-flag
set, which is the secret handshake for the memory allocator to not
use GFP_FS. For cases where we are only reading the extent list,
we would not be doing allocations before and we'd not be protected
by that extra magic. So now those paths can start getting ENOMEM
in places where that wouldn't have happened before.. I guess that
filesystem shutdowns could result, possibly.
> FWIW, I have done low memory testing and I wasn't about to trigger
> any problems.....
It would be a once-in-a-blue-moon type problem though, unfortunately;
one of the really-really-hard to trigger types of problem.
> > (Oh, and why the _zalloc? Could just do an _alloc, since previous
> > code was using non-zeroed memory - so, should have been filling in
> > all fields).
>
> Habit. And it doesn't hurt performance at all - we've got to take
Hrmmm... is there any point in having a non-zeroing interface at
all then? I thought the non-zeroing version was about all using
the fact that you know you're going to overwrite all the fields
anyway shortly, so theres no point zeroing initially...
cheers.
--
Nathan
next prev parent reply other threads:[~2007-04-20 4:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-19 7:25 review: allocate bmapi args David Chinner
2007-04-19 7:51 ` Nathan Scott
2007-04-19 8:23 ` David Chinner
2007-04-20 4:41 ` Nathan Scott [this message]
2007-04-20 5:34 ` David Chinner
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=1177044117.6273.203.camel@edge \
--to=nscott@aconex.com \
--cc=dgc@sgi.com \
--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