Commit 1010bb1b authored by Fengguang Wu's avatar Fengguang Wu Committed by Linus Torvalds

mm: don't set __GFP_WRITE on ramfs/sysfs writes

There is not much 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.
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Greg Thelen <gthelen@google.com>
Cc: Ying Han <yinghan@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a05b0855
...@@ -2341,7 +2341,9 @@ struct page *grab_cache_page_write_begin(struct address_space *mapping, ...@@ -2341,7 +2341,9 @@ struct page *grab_cache_page_write_begin(struct address_space *mapping,
struct page *page; struct page *page;
gfp_t gfp_notmask = 0; 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) if (flags & AOP_FLAG_NOFS)
gfp_notmask = __GFP_FS; gfp_notmask = __GFP_FS;
repeat: repeat:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment