commit | 538a2c631db36d0f69ad6413bc3270c7dc660e58 | [log] [tgz] |
---|---|---|
author | Vincent Donnefort <vdonnefort@google.com> | Wed Mar 20 16:01:10 2024 +0000 |
committer | Vincent Donnefort <vdonnefort@google.com> | Fri May 10 17:03:45 2024 +0100 |
tree | dc8eb41eef26e5628e404f51bc611d8f31da15ab | |
parent | fe6eaa2122e964eb298f75a6698432fe9c1789b5 [diff] |
virtmgr: Pass hugepages to crosvm Now crosvm applies block alignment ("arm64: Align RAM region with the block size") when mmaping the RAM region for a VM, it is possible to back this memory with THP (transparent-hugepages). This is controlled by either the VM config option "hugepages" or the "bin/vm" option "--hugepages" Enabling --hugepages makes crosvm "madvise(MADV_HUGEPAGE)" that region. This will have at the moment no effect on Android as the default value for /sys/kernel/mm/transparent_hugepages/shmem_enabled is [never]. However, it'll enable OEMs to turn on the feature by tweaking the latter knob. Using THP brings a significant performance improvement by reducing the number of fault necessary when using a VM (/512 for a 4K pages Arm machine) and reducing the pressure on the TLB (for both stage-1 and stage-2). However, finding huge pages might be a difficult task when the system has been running for a long time and the memory is quite fragmented. khugepaged helps promoting pages to huge-pages but running it has a cost and might delay the memory allocation depending on the chosen defrag policy. Bug: 278011447 Change-Id: I954f93df4f08ad015958d36d115d9f9e0c3547b5
Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.
Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.
If you want a quick start, see the getting started guideline and follow the steps there.
For in-depth explanations about individual topics and components, visit the following links.
AVF components:
AVF APIs:
How-Tos: