* [PATCH] mm: don't set __GFP_WRITE on ramfs/sysfs writes
@ 2012-03-02 6:10 Fengguang Wu
2012-03-04 7:11 ` Minchan Kim
0 siblings, 1 reply; 2+ messages in thread
From: Fengguang Wu @ 2012-03-02 6:10 UTC (permalink / raw)
To: Andrew Morton
Cc: Johannes Weiner, Jan Kara, Greg Thelen, Ying Han,
KAMEZAWA Hiroyuki, Rik van Riel, Mel Gorman, Minchan Kim,
Linux Memory Management List, LKML
There is not much of a point in skipping zones during allocation based
on the dirty usage which they'll never contribute to. And we'd like to
avoid page reclaim waits when writing to ramfs/sysfs etc.
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
mm/filemap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- linux.orig/mm/filemap.c 2012-03-02 14:06:47.000000000 +0800
+++ linux/mm/filemap.c 2012-03-02 14:07:21.325766507 +0800
@@ -2341,7 +2341,9 @@ struct page *grab_cache_page_write_begin
struct page *page;
gfp_t gfp_notmask = 0;
- gfp_mask = mapping_gfp_mask(mapping) | __GFP_WRITE;
+ gfp_mask = mapping_gfp_mask(mapping);
+ if (mapping_cap_account_dirty(mapping))
+ gfp_mask |= __GFP_WRITE;
if (flags & AOP_FLAG_NOFS)
gfp_notmask = __GFP_FS;
repeat:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: don't set __GFP_WRITE on ramfs/sysfs writes
2012-03-02 6:10 [PATCH] mm: don't set __GFP_WRITE on ramfs/sysfs writes Fengguang Wu
@ 2012-03-04 7:11 ` Minchan Kim
0 siblings, 0 replies; 2+ messages in thread
From: Minchan Kim @ 2012-03-04 7:11 UTC (permalink / raw)
To: Fengguang Wu
Cc: Andrew Morton, Johannes Weiner, Jan Kara, Greg Thelen, Ying Han,
KAMEZAWA Hiroyuki, Rik van Riel, Mel Gorman, Minchan Kim,
Linux Memory Management List, LKML
On Fri, Mar 02, 2012 at 02:10:35PM +0800, Fengguang Wu wrote:
> There is not much of a point in skipping zones during allocation based
> on the dirty usage which they'll never contribute to. And we'd like to
> avoid page reclaim waits when writing to ramfs/sysfs etc.
>
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Minchan Kim <minchan@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-04 7:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-02 6:10 [PATCH] mm: don't set __GFP_WRITE on ramfs/sysfs writes Fengguang Wu
2012-03-04 7:11 ` Minchan Kim
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).