The tables that L2 runs on were filled with pages of 4 KB only, one VM
exit for each. They are emptied whenever the pmap of the VM has
changed, and that is often: the page daemon clears the reference bits
of the guest's pages all the time, and each one is an invalidation of
the EPT. An L2 that uses much memory then spends its time getting its
pages back.
Where both L1's tables and the pmap have a page of 2 MB or more, the
tables that L2 runs on now get a page of 2 MB.
AI assistance: as D61708, this change was developed with an AI assistant (Anthropic's Claude) under my direction. The assistant wrote the code and this description. The tests in the test plan were run on real hardware.
Signed-off-by: Wanpeng Qian <wanpengqian@gmail.com>
Sponsored by: keelos.dev