ANDROID: mm: Add hooks to filemap_fault for oem's optimization

Add vendor_hooks to filemap_fault to cache page for oem's optimization.
Save the page for next time retry when VM_FAULT_RETRY returned.

Add ANDROID_OEM_DATA to vm_fault to save the page.

Bug: 188891314
Change-Id: Ibfc9ec950c3360e6f6ccb9546cab0acd89e5d316
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
This commit is contained in:
Liangliang Li
2021-06-08 10:00:02 +08:00
committed by Sandeep Patil
parent 97e5f9c0f8
commit da33f6fa6c
4 changed files with 21 additions and 2 deletions

View File

@@ -42,6 +42,12 @@ DECLARE_HOOK(android_vh_pagecache_get_page,
TP_PROTO(struct address_space *mapping, pgoff_t index,
int fgp_flags, gfp_t gfp_mask, struct page *page),
TP_ARGS(mapping, index, fgp_flags, gfp_mask, page));
DECLARE_HOOK(android_vh_filemap_fault_get_page,
TP_PROTO(struct vm_fault *vmf, struct page **page, bool *retry),
TP_ARGS(vmf, page, retry));
DECLARE_HOOK(android_vh_filemap_fault_cache_page,
TP_PROTO(struct vm_fault *vmf, struct page *page),
TP_ARGS(vmf, page));
DECLARE_HOOK(android_vh_meminfo_proc_show,
TP_PROTO(struct seq_file *m),
TP_ARGS(m));