ANDROID: mm: sync rss in speculative page fault path

The speculative page fault path does not sync the
rss in task_struct to mm_struct leading to large
variance in the RSS values observed by userspace
tools and also in the OOM task dump.

Change-Id: Id45f1b9b0a51a9afffbaf8e65f5ef747d409d0d7
Bug: 179217427
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
Vinayak Menon
2020-09-17 19:34:45 +05:30
committed by Suren Baghdasaryan
parent c71118016d
commit cf397c6c26

View File

@@ -4856,6 +4856,8 @@ int __handle_speculative_fault(struct mm_struct *mm, unsigned long address,
flags &= ~(FAULT_FLAG_ALLOW_RETRY|FAULT_FLAG_KILLABLE);
flags |= FAULT_FLAG_SPECULATIVE;
check_sync_rss_stat(current);
*vma = get_vma(mm, address);
if (!*vma)
return VM_FAULT_RETRY;