ANDROID: mm: allow vmas with vm_ops to be speculatively handled
Right now only anonymous page faults are speculatively handled, 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 enables speculative fault for ext4, f2fs and shmem. The feature is disabled by default and enabled via allow_file_spec_access kernel param. Bug: 171954515 Change-Id: I0d23ebf299000e4ac5e2c71bc0b7fc9006e98da9 Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
@@ -171,6 +171,9 @@ static const struct vm_operations_struct f2fs_file_vm_ops = {
|
||||
.fault = f2fs_filemap_fault,
|
||||
.map_pages = filemap_map_pages,
|
||||
.page_mkwrite = f2fs_vm_page_mkwrite,
|
||||
#ifdef CONFIG_SPECULATIVE_PAGE_FAULT
|
||||
.allow_speculation = filemap_allow_speculation,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int get_parent_ino(struct inode *inode, nid_t *pino)
|
||||
|
Reference in New Issue
Block a user