From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Neil Brown <neilb@suse.de>, Alasdair G Kergon <agk@redhat.com>,
linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/6] md: remove dependency on __GFP_NOFAIL
Date: Mon, 23 Aug 2010 13:23:15 -0700 [thread overview]
Message-ID: <20100823132315.6906ddbe.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1008231303410.17716@chino.kir.corp.google.com>
On Mon, 23 Aug 2010 13:08:53 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> On Mon, 23 Aug 2010, Andrew Morton wrote:
>
> > Hows about you add a helper function
> >
> > void *[kmalloc|alloc_page]_retrying_forever_because_i_suck(lots of args)
> >
> > then convert the callsites to use that, then nuke __GFP_NOFAIL?
> >
>
> That would only serve as documentation
Is that bad?
> of a caller that could potentially
> loop forever waiting for memory (which I did by adding "/* FIXME: this may
> potentially loop forever */")
A helper function could check that appropriate gfp flags are being set.
> since all of the allocations in this
> patchset never loop in the code that was added, they already loop forever
> in the page allocator doing the same thing. The hope is that kswapd will
> eventually be able to free memory since direct reclaim will usually fail
> for GFP_NOFS and we simply need to wait long enough for there to be
> memory.
While holding locks which will prevent kswapd from doing anything useful.
next prev parent reply other threads:[~2010-08-23 20:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.2.00.1008161953430.17924@chino.kir.corp.google.com>
2010-08-17 2:57 ` [patch 1/6] md: remove dependency on __GFP_NOFAIL David Rientjes
2010-08-23 19:26 ` Andrew Morton
2010-08-23 19:35 ` David Rientjes
2010-08-23 19:51 ` Andrew Morton
2010-08-23 20:03 ` David Rientjes
2010-08-23 20:01 ` Andrew Morton
2010-08-23 20:08 ` David Rientjes
2010-08-23 20:23 ` Andrew Morton [this message]
2010-08-23 20:37 ` David Rientjes
2010-08-23 20:09 ` Pekka Enberg
2010-08-23 20:13 ` David Rientjes
2010-08-23 20:29 ` Pekka Enberg
2010-08-23 20:40 ` David Rientjes
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=20100823132315.6906ddbe.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=agk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=rientjes@google.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;
as well as URLs for NNTP newsgroup(s).