Commit 65aed0e2 authored by Kalesh Singh's avatar Kalesh Singh
Browse files

ANDROID: 16K: Avoid and document padding madvise lock warning



Usually to modify vm_flags we need to take exclusive mmap_lock but here
only have the lock in read mode, to avoid all DONTNEED/DONTNEED_LOCKED
calls needing the write lock.

A race to the flags update can only happen with another MADV_DONTNEED on
the same process and same range (VMA).

In practice, this specific scenario is not possible  because the action
that could cause it is usually performed at most once per VMA and only by the dynamic linker.

Forego protection for this case, to avoid penalties in the common cases.

Bug: 344634072
Change-Id: I54ac1f204e0445291f3df3872fbaa16b37722812
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
parent ec795e4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment