compos: Enable huge_pages
The huge_pages VM option (a.k.a. transparent huge-pages in kernel land)
gives a hint to the kernel the guest memory can be backed with
huge-pages. (i.e. 2MB on 4K arm64 systems).
On a Pixel6, this lead to a 2 seconds improvement, out of a total of 30
seconds for test-compile.
Notice although this will have no effect, until
/sys/kernel/mm/transparent_hugepages/shmem_enabled is set to "advise".
Bug: 278011447
Change-Id: Ic3da81c0ae7777a4954d4cbd9ab7e8a0ac7652c9
diff --git a/compos/apk/assets/vm_config.json b/compos/apk/assets/vm_config.json
index 1f5cdba..28e0f07 100644
--- a/compos/apk/assets/vm_config.json
+++ b/compos/apk/assets/vm_config.json
@@ -27,5 +27,6 @@
}
],
"export_tombstones": true,
- "enable_authfs": true
+ "enable_authfs": true,
+ "hugepages": true
}
diff --git a/compos/apk/assets/vm_config_staged.json b/compos/apk/assets/vm_config_staged.json
index 37b1d7a..afc3767 100644
--- a/compos/apk/assets/vm_config_staged.json
+++ b/compos/apk/assets/vm_config_staged.json
@@ -28,5 +28,6 @@
}
],
"export_tombstones": true,
- "enable_authfs": true
+ "enable_authfs": true,
+ "hugepages": true
}
diff --git a/compos/apk/assets/vm_config_system_ext.json b/compos/apk/assets/vm_config_system_ext.json
index 1ef43f0..730f592 100644
--- a/compos/apk/assets/vm_config_system_ext.json
+++ b/compos/apk/assets/vm_config_system_ext.json
@@ -30,5 +30,6 @@
}
],
"export_tombstones": true,
- "enable_authfs": true
+ "enable_authfs": true,
+ "hugepages": true
}
diff --git a/compos/apk/assets/vm_config_system_ext_staged.json b/compos/apk/assets/vm_config_system_ext_staged.json
index 9103a9e..6d91aa2 100644
--- a/compos/apk/assets/vm_config_system_ext_staged.json
+++ b/compos/apk/assets/vm_config_system_ext_staged.json
@@ -31,5 +31,6 @@
}
],
"export_tombstones": true,
- "enable_authfs": true
+ "enable_authfs": true,
+ "hugepages": true
}