From: David Rientjes <rientjes@google.com>
To: Prasad Joshi <prasadjoshi124@gmail.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Anand Mitra <mitra@kqinfotech.com>
Subject: Re: [RFC][PATCH 00/25]: Propagating GFP_NOFS inside __vmalloc()
Date: Fri, 11 Mar 2011 13:01:36 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.00.1103111258340.31216@chino.kir.corp.google.com> (raw)
In-Reply-To: <AANLkTimU2QGc_BVxSWCN8GEhr8hCOi1Zp+eaA20_pE-w@mail.gmail.com>
On Fri, 11 Mar 2011, Prasad Joshi wrote:
> A filesystem might run into a problem while calling
> __vmalloc(GFP_NOFS) inside a lock.
>
> It is expected than __vmalloc when called with GFP_NOFS should not
> callback the filesystem code even incase of the increased memory
> pressure. But the problem is that even if we pass this flag, __vmalloc
> itself allocates memory with GFP_KERNEL.
>
> Using GFP_KERNEL allocations may go into the memory reclaim path and
> try to free memory by calling file system clear_inode/evict_inode
> function. Which might lead into deadlock.
>
> For further details
> https://bugzilla.kernel.org/show_bug.cgi?id=30702
> http://marc.info/?l=linux-mm&m=128942194520631&w=4
>
> The patch passes the gfp allocation flag all the way down to those
> allocating functions.
>
You're going to run into trouble by hard-wiring __GFP_REPEAT into all of
the pte allocations because if GFP_NOFS is used then direct reclaim will
usually fail (see the comment for do_try_to_free_pages(): If the caller is
!__GFP_FS then the probability of a failure is reasonably high) and, if
it does so continuously, then the page allocator will loop forever. This
bit should probably be moved a level higher in your architecture changes
to the caller passing GFP_KERNEL.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-03-11 21:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 20:35 Prasad Joshi
2011-03-11 21:01 ` David Rientjes [this message]
2011-03-11 21:13 ` Prasad Joshi
2011-03-11 23:08 ` David Rientjes
2011-03-12 2:05 ` Anand Mitra
2011-03-13 1:22 ` 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=alpine.DEB.2.00.1103111258340.31216@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mitra@kqinfotech.com \
--cc=prasadjoshi124@gmail.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