We're currently doing page-at-a-time synchronous I/O.  Pop a call to
do_page_cache_readahead() in there so we do a big slurp of IO first.

This is simplistic.


 mm/filemap.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN mm/filemap.c~filemap_populate-speedup mm/filemap.c
--- 25/mm/filemap.c~filemap_populate-speedup	2003-03-13 00:23:32.000000000 -0800
+++ 25-akpm/mm/filemap.c	2003-03-13 00:23:32.000000000 -0800
@@ -1207,6 +1207,10 @@ static int filemap_populate(struct vm_ar
 	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)

_