Use MOVE (uffd) ioctl for mapping compacted pages
Currently we use COPY ioctl to map compacted pages. But it incurs high
overhead as the page(s) are allocated in the kernel, memset zeroed, and then
memcpy'ed before mapping them. On the other hand, MOVE ioctl avoids all
of this and directly maps the soure page. This also enables us to
recycle the from-space pages in userspace, thereby eliminating the need
for madvise.
NOTE: Black-dense pages will still use COPY ioctl. A subsequent CL will
cover them.
Flag: com.android.art.flags.use_uffd_move_ioctl
Bug: 343220989
Test: art/test/testrunner/testrunner.py --host
(AOSP: https://android-review.git.corp.google.com/c/platform/art/+/3440344)
Change-Id: I3bac4093d226334fc30230c5ba3481184dcc987a
3 files changed