Commit 2e06e5e6 authored by Liujie Xie's avatar Liujie Xie Committed by Suren Baghdasaryan
Browse files

FROMLIST: mm/madvise: add MADV_WILLNEED to process_madvise()

There is a usecase in Android that an app process's memory is swapped
out by process_madvise() with MADV_PAGEOUT, such as the memory is
swapped to zram or a backing device. When the process is scheduled to
running, like switch to foreground, multiple page faults may cause the
app dropped frames.

To reduce the problem, SMS can read-ahead memory of the process
immediately when the app switches to forground.
Calling process_madvise() with MADV_WILLNEED can meet this need.

Link: https://lore.kernel.org/patchwork/patch/1472006/


Bug: 194967441
Signed-off-by: default avatarKui Zhang <zhagnkui@oppo.com>
Signed-off-by: default avatarLiujie Xie <xieliujie@oppo.com>
Change-Id: Ie4203ff76da74cf34498cfee6569a6c7fc624bb2
parent ff7eccee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment