Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81586309 authored by Trilok Soni's avatar Trilok Soni
Browse files

(fix for arm64) readahead: fault retry breaks mmap file read random detection



Original commit	(45cac65b: readahead: fault retry breaks mmap
file read random detection) didn't had arm64 architecture support at the
time it was merged back in 2012. We should now have this fix for arm64.

.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 :)

Change-Id: Ib0d911c27f2347b2f1fa56231ff9ad518adf5988
Signed-off-by: default avatarTrilok Soni <tsoni@codeaurora.org>
parent 2344e053
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment