Shaohua Li 45cac65b0f readahead: fault retry breaks mmap file read random detection
.fault now can retry.  The retry can break state machine of .fault.  In
filemap_fault, if page is miss, ra->mmap_miss is increased.  In the second
try, since the page is in page cache now, ra->mmap_miss is decreased.  And
these are done in one fault, so we can't detect random mmap file access.

Add a new flag to indicate .fault is tried once.  In the second try, skip
ra->mmap_miss decreasing.  The filemap_fault state machine is ok with it.

I only tested x86, didn't test other archs, but looks the change for other
archs is obvious, but who knows :)

Signed-off-by: Shaohua Li <shaohua.li@fusionio.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:22:47 +09:00
..
2009-04-01 08:59:17 -07:00
2011-05-25 08:39:41 -07:00
2009-12-15 08:53:25 -08:00
2011-11-02 14:15:26 +01:00
2010-09-22 17:22:39 -07:00
2012-08-02 00:49:17 +02:00
2012-05-05 13:00:26 +02:00
2012-09-27 18:04:55 +02:00
2012-09-27 18:04:55 +02:00
2012-08-02 00:49:17 +02:00
2012-05-21 21:09:33 +02:00
2012-05-05 13:00:26 +02:00
2008-02-05 09:44:30 -08:00