summaryrefslogtreecommitdiff
path: root/compiler/utils/assembler_test_base.h
diff options
context:
space:
mode:
author Lokesh Gidra <lokeshgidra@google.com> 2024-02-21 23:41:40 +0000
committer Lokesh Gidra <lokeshgidra@google.com> 2024-05-13 16:30:19 +0000
commit89591d0bc44afce25a41801515c240e89494b90a (patch)
tree1fffaed86147ace14e6edb48add127db81e5e0c0 /compiler/utils/assembler_test_base.h
parenta62b40a338dd6a7fb53fd1fe806d26a6bb423363 (diff)
Handle EAGAIN (due to map_lock contention) from uffd ops
This CL does the following: 1) Skip setting 'mapping' state for the pages before they are being mapped. This helps with eliminating priority inversion. Kernel returns EEXIST when any thread attempts to map a page which is already mapped. 2) When kernel supports MMAP_TRYLOCK mode for COPY/ZEROPAGE ioctls, use the mode to avoid clogging mmap_lock's wait-list. Mutator's delay is decided based on their native-priority. 3) GC-thread doesn't waste time in mmap_lock's wait-list as long as there are pages remaining to be compacted. But after that, it maps all the pages even if that means waiting for lock. However, due to `mmap_lock_is_contended` check in the kernel, the ioctl immediately returns thereby not holding up writers and re-attempts the ioctl for remaining pages. Bug: 320478828 Test: boot cuttlefish instance with 5.15 kernel Change-Id: I9e7d1df27f99b7179bb475a5b0bb587093caa549
Diffstat (limited to 'compiler/utils/assembler_test_base.h')
0 files changed, 0 insertions, 0 deletions