mm: allow vmas with vm_ops to be speculatively handled
Right now only anonymous pages are speculatively faulted, thus
leaving out a large percentage of faults still requiring to
take mmap_sem. These were left out since there can be fault
handlers mainly in the fs layer which may use vma in unknown
ways. This patch covers filemap_fault and shmem_fault and
enables speculative fault for all those vmas with vm_ops.
None of the other common fault handlers is seen to use or
modify vma.
Change-Id: I4f87909002f7ac64945f048ba0169a4cac7a15ab
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
diff --git a/mm/vmstat.c b/mm/vmstat.c
index bfec4ac..0c8a43f 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1295,7 +1295,8 @@
"swap_ra_hit",
#endif
#ifdef CONFIG_SPECULATIVE_PAGE_FAULT
- "speculative_pgfault"
+ "speculative_pgfault_anon",
+ "speculative_pgfault_file",
#endif
#endif /* CONFIG_VM_EVENT_COUNTERS */
};