From: Dave Chinner <david@fromorbit.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Dave Chinner <dchinner@redhat.com>,
Christoph Hellwig <hch@infradead.org>,
linux-fsdevel@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tejun Heo <tj@kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
xfs@oss.sgi.com
Subject: Re: [PATCH] mm: add gfp_mask parameter to vm_map_ram()
Date: Thu, 14 Jun 2012 12:15:47 +1000 [thread overview]
Message-ID: <20120614021547.GC7339@dastard> (raw)
In-Reply-To: <20120614014902.GB7289@localhost>
On Thu, Jun 14, 2012 at 09:49:02AM +0800, Fengguang Wu wrote:
> On Thu, Jun 14, 2012 at 11:20:26AM +1000, Dave Chinner wrote:
> >
> > Bug in vm_map_ram - it does an unconditional GFP_KERNEL allocation
> > here, and we are in a GFP_NOFS context. We can't pass a gfp_mask to
> > vm_map_ram(), so until vm_map_ram() grows that we can't fix it...
>
> This trivial patch should fix it.
>
> The only behavior change is the XFS part:
>
> @@ -406,7 +406,7 @@ _xfs_buf_map_pages(
>
> do {
> bp->b_addr = vm_map_ram(bp->b_pages, bp->b_page_count,
> - -1, PAGE_KERNEL);
> + -1, GFP_NOFS, PAGE_KERNEL);
This function isn't always called in GFP_NOFS context - readahead
uses different memory allocation semantics (no retry, no warn), so
there are flags that tell it what to do. i.e.
- -1, PAGE_KERNEL);
+ -1, xb_to_gfp(flags), PAGE_KERNEL);
Otherwise looks fine to me...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2012-06-14 2:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120612012134.GA7706@localhost>
[not found] ` <20120613123932.GA1445@localhost>
[not found] ` <20120614012026.GL3019@devil.redhat.com>
2012-06-14 1:49 ` [PATCH] mm: add gfp_mask parameter to vm_map_ram() Fengguang Wu
2012-06-14 2:07 ` Minchan Kim
2012-06-14 2:21 ` Tejun Heo
2012-06-14 2:39 ` Minchan Kim
2012-06-14 3:34 ` Dave Chinner
2012-06-14 3:53 ` David Rientjes
2012-06-14 5:51 ` Minchan Kim
2012-06-14 7:52 ` Andreas Dilger
2012-06-14 2:15 ` Dave Chinner [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=20120614021547.GC7339@dastard \
--to=david@fromorbit.com \
--cc=akpm@linux-foundation.org \
--cc=dchinner@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tj@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).