lkml.org 
[lkml]   [2012]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] mm: don't set __GFP_WRITE on ramfs/sysfs writes
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:

\
 
 \ /
  Last update: 2012-03-02 07:13    [W:0.028 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site