Commit 3ec36cbe authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[PATCH] filemap_populate speedup

filemap_populate() is currently doing page-at-a-time synchronous I/O.  Add a
call to do_page_cache_readahead() in there so we do a big slurp of IO first.

This is minimal - a lot of the filemap_populate() code can be
rationalised yet.
parent e1513512
......@@ -1207,6 +1207,10 @@ static int filemap_populate(struct vm_area_struct *vma,
struct page *page;
int err;
if (!nonblock)
do_page_cache_readahead(mapping, vma->vm_file,
pgoff, len >> PAGE_CACHE_SHIFT);
repeat:
size = (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
if (pgoff + (len >> PAGE_CACHE_SHIFT) > size)
......
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