Commit ba6ef9bd authored by Lokesh Gidra's avatar Lokesh Gidra
Browse files

ANDROID: userfaultfd: add MMAP_TRYLOCK mode for COPY/ZEROPAGE



In case mmap_lock is contended, it is possible that userspace can spend
time performing other tasks rather than waiting in uninterruptible-sleep
state for the lock to become available. Even if no other task is
available, it is better to yield or sleep rather than adding contention
to already contended lock.

We introduce MMAP_TRYLOCK mode so that when possible, userspace can
request to use mmap_read_trylock(), returning -EAGAIN if and when it
fails.

Bug: 320478828
Change-Id: I2d196fd317e054af03dbd35ac1b0c7634cb370dc
Signed-off-by: default avatarLokesh Gidra <lokeshgidra@google.com>
parent 77741f2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment