]> git.baikalelectronics.ru Git - kernel.git/commit
readahead: return early when readahead is disabled
authorWu Fengguang <fengguang.wu@intel.com>
Wed, 25 May 2011 00:12:28 +0000 (17:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 May 2011 15:39:26 +0000 (08:39 -0700)
commit88f85319a8c49a3f237f8ed1992e606e3ec2f8b4
treeebed0109eaa3e4a015bc1653f4d933f2e84c794f
parent611bfa5c22bd554f2925148db09d48e78345c104
readahead: return early when readahead is disabled

Reduce readahead overheads by returning early in do_sync_mmap_readahead().

tmpfs has ra_pages=0 and it can page fault really fast (not constraint by
IO if not swapping).

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Tested-by: Tim Chen <tim.c.chen@intel.com>
Reported-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c