[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20131021214828.GL29870@hippobay.mtv.corp.google.com>
Date: Mon, 21 Oct 2013 14:48:28 -0700
From: Ning Qu <quning@...gle.com>
To: Andrea Arcangeli <aarcange@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Hugh Dickins <hughd@...gle.com>
Cc: Al Viro <viro@...iv.linux.org.uk>, Hugh Dickins <hughd@...gle.com>,
Wu Fengguang <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
Andi Kleen <ak@...ux.intel.com>,
Matthew Wilcox <willy@...ux.intel.com>,
Hillf Danton <dhillf@...il.com>, Dave Hansen <dave@...1.net>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Ning Qu <quning@...gle.com>, Ning Qu <quning@...il.com>
Subject: [PATCHv2 11/13] mm, thp, tmpfs: only alloc small pages in
shmem_file_splice_read
We just hope this is not a common case path. The huge page can't be
added without completely refactoring the code.
Signed-off-by: Ning Qu <quning@...il.com>
---
mm/shmem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/shmem.c b/mm/shmem.c
index 48b1d84..c42331a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1950,6 +1950,7 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos,
index += spd.nr_pages;
error = 0;
+ i_split_down_read(inode);
while (spd.nr_pages < nr_pages) {
error = shmem_getpage(inode, index, &page, SGP_CACHE, gfp,
0, NULL);
@@ -2019,6 +2020,7 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos,
*ppos += error;
file_accessed(in);
}
+ i_split_up_read(inode);
return error;
}
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists