Commit 38447e01 authored by Kalesh Singh's avatar Kalesh Singh
Browse files

ANDROID: 16K: x86_64: Disable userfaultfd



When emulating 16KB page size on x86_64, the kernel presents a 16KB page
size to userspace. However the kernel and hardware still operates at a
4KB page size granularity.

This mean that even though the mimumun size of memory that userspace can
request is 16384 (from mmap); faults still happen at a 4KB granularity
in the kernel.

This is inherently incompatible with UFFD, which is used by the default
ART GC in Android V. Since UFFD necessarily needs to operate on
PTEs (4096) but from the client's perspective in userspace the page size
is 16384.

Disable the UFFD if emulating 16KB (larger than 4KB) page sizes on
x86_64.

Bug: 385144325
Bug: 379001861
Bug: 384985178
Bug: 377361489
Test: Tested on Android Studio x86_64 emulator no system restarts.
Test: grep -i 'collectortype' logcat; Expect collector type CC instead
      of collectortype CMC (UFFD GC)
Change-Id: Idad47e5f57aa1843921d550f16f248ed34da2100
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
parent 3d970e33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment