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 Bug: 352266747 Change-Id: I54ac1f204e0445291f3df3872fbaa16b37722812 Signed-off-by:Kalesh Singh <kaleshsingh@google.com> (cherry picked from commit 65aed0e2)
Loading
Please sign in to comment