From: David Rientjes <rientjes@google.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: "Ricardo M. Correia" <ricardo.correia@oracle.com>,
linux-mm@kvack.org, linux-arch@vger.kernel.org,
andreas.dilger@oracle.com, behlendorf1@llnl.gov
Subject: Re: [PATCH] Fix unconditional GFP_KERNEL allocations in __vmalloc().
Date: Thu, 23 Dec 2010 13:08:07 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.00.1012231305080.26724@chino.kir.corp.google.com> (raw)
In-Reply-To: <20101217162626.DA0A.A69D9226@jp.fujitsu.com>
On Fri, 17 Dec 2010, KOSAKI Motohiro wrote:
> > (Patch based on 2.6.36 tag).
> >
> > These GFP_KERNEL allocations could happen even though the caller of __vmalloc()
> > requested a stricter gfp mask (such as GFP_NOFS or GFP_ATOMIC).
> >
> > This was first noticed in Lustre, where it led to deadlocks due to a filesystem
> > thread which requested a GFP_NOFS __vmalloc() allocation ended up calling down
> > to Lustre itself to free memory, despite this not being allowed by GFP_NOFS.
> >
> > Further analysis showed that some in-tree filesystems (namely GFS, Ceph and XFS)
> > were vulnerable to the same bug due to calling __vmalloc() or vm_map_ram() in
> > contexts where __GFP_FS allocations are not allowed.
> >
> > Fixing this bug required changing a few mm interfaces to accept gfp flags.
> > This needed to be done in all architectures, thus the large number of changes.
>
> I like this patch. but please separate it two patches.
>
> 1) add gfp_mask argument to some function
> 2) vmalloc use flexible mask instead GFP_KERNEL always.
>
> I mean please consider to make reviewers friendly patch.
> IOW, please see your diffstat. ;)
>
I agree, I'm also wondering if it would be easier to introduce seperate,
lower-level versions of the functions that the current interfaces would
then use instead of converting all of their current use cases. Using
pmd_alloc_one() as an example: convert existing pmd_alloc_one() to
__pmd_alloc_one() for each arch and add the gfp_t formal), then introduce
a new pmd_alloc_one() that does __pmd_alloc_one(..., 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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2010-12-23 21:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 2:45 Ricardo M. Correia
2010-12-15 2:53 ` Ricardo M. Correia
2010-12-15 3:48 ` Cross compilers (Was: Re: [PATCH] Fix unconditional GFP_KERNEL allocations in __vmalloc().) Stephen Rothwell
2010-12-23 21:37 ` Randy Dunlap
2011-01-09 23:17 ` Tony Breeds
2010-12-17 7:27 ` [PATCH] Fix unconditional GFP_KERNEL allocations in __vmalloc() KOSAKI Motohiro
2010-12-23 21:08 ` David Rientjes [this message]
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.1012231305080.26724@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=andreas.dilger@oracle.com \
--cc=behlendorf1@llnl.gov \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ricardo.correia@oracle.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