* [PATCH 10/12] mm, thp, tmpfs: only alloc small pages in shmem_file_splice_read
@ 2013-10-15 0:13 Ning Qu
0 siblings, 0 replies; only message in thread
From: Ning Qu @ 2013-10-15 0:13 UTC (permalink / raw)
To: Andrea Arcangeli, Andrew Morton, Kirill A. Shutemov, Hugh Dickins
Cc: Al Viro, Hugh Dickins, Wu Fengguang, Jan Kara, Mel Gorman,
linux-mm, Andi Kleen, Matthew Wilcox, Hillf Danton, Dave Hansen,
Alexander Shishkin, linux-fsdevel, linux-kernel, Ning Qu
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@gmail.com>
---
mm/shmem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/shmem.c b/mm/shmem.c
index cbf01ce..75c0ac6 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1973,6 +1973,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);
@@ -2042,6 +2043,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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-15 0:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-15 0:13 [PATCH 10/12] mm, thp, tmpfs: only alloc small pages in shmem_file_splice_read Ning Qu
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).