summaryrefslogtreecommitdiffstats
path: root/arch/hexagon/mm
diff options
context:
space:
mode:
authorShaohua Li <shli@kernel.org>2012-10-08 16:32:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 16:22:47 +0900
commit45cac65b0fcd287ebb877b141d40ba9bbe8e5da7 (patch)
tree30ed25c91aaeed153de51a78d171cb14582e383f /arch/hexagon/mm
parente79bee24fd6134f90af4228cfebd010136d67631 (diff)
downloadop-kernel-dev-45cac65b0fcd287ebb877b141d40ba9bbe8e5da7.zip
op-kernel-dev-45cac65b0fcd287ebb877b141d40ba9bbe8e5da7.tar.gz
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>
Diffstat (limited to 'arch/hexagon/mm')
-rw-r--r--arch/hexagon/mm/vm_fault.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/hexagon/mm/vm_fault.c b/arch/hexagon/mm/vm_fault.c
index 06695cc..513b74c 100644
--- a/arch/hexagon/mm/vm_fault.c
+++ b/arch/hexagon/mm/vm_fault.c
@@ -113,6 +113,7 @@ good_area:
current->min_flt++;
if (fault & VM_FAULT_RETRY) {
flags &= ~FAULT_FLAG_ALLOW_RETRY;
+ flags |= FAULT_FLAG_TRIED;
goto retry;
}
}
OpenPOWER on IntegriCloud