mirror of
https://github.com/hanzoai/vm.git
synced 2026-10-01 00:47:56 +00:00
kernel: x86 x2apic + deferred struct-page init
cloud-hypervisor describes vCPUs as x2apic MADT entries; without CONFIG_X86_X2APIC the kernel ignored them and every x86_64 guest booted with a single CPU regardless of --cpus. DEFERRED_STRUCT_PAGE_INIT moves the largest silent stretch of early boot onto all CPUs (x86 guest boot 202 -> 130 ms); measured as a wash on arm64 (VZ and KVM), so only x86 takes it. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -8,6 +8,9 @@ CONFIG_ARM64=y
|
|||||||
CONFIG_ARCH_VIRT=y
|
CONFIG_ARCH_VIRT=y
|
||||||
CONFIG_SMP=y
|
CONFIG_SMP=y
|
||||||
CONFIG_NR_CPUS=16
|
CONFIG_NR_CPUS=16
|
||||||
|
# DEFERRED_STRUCT_PAGE_INIT measured as a wash here (VZ and KVM, 2 GB
|
||||||
|
# guests): the deferred pass costs what the serial pass saved. x86 keeps
|
||||||
|
# it because cloud-hypervisor guests measurably win.
|
||||||
|
|
||||||
# No loadable modules
|
# No loadable modules
|
||||||
# CONFIG_MODULES is not set
|
# CONFIG_MODULES is not set
|
||||||
|
|||||||
@@ -7,6 +7,12 @@
|
|||||||
CONFIG_64BIT=y
|
CONFIG_64BIT=y
|
||||||
CONFIG_SMP=y
|
CONFIG_SMP=y
|
||||||
CONFIG_NR_CPUS=16
|
CONFIG_NR_CPUS=16
|
||||||
|
# cloud-hypervisor describes vCPUs as x2apic MADT entries; without this the
|
||||||
|
# kernel ignores them and boots one CPU no matter how many were given.
|
||||||
|
CONFIG_X86_X2APIC=y
|
||||||
|
# Initialize struct pages on all CPUs after smp_init instead of serially on
|
||||||
|
# the boot CPU — trims the single largest silent stretch of early boot.
|
||||||
|
CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
|
||||||
CONFIG_HYPERVISOR_GUEST=y
|
CONFIG_HYPERVISOR_GUEST=y
|
||||||
CONFIG_PARAVIRT=y
|
CONFIG_PARAVIRT=y
|
||||||
CONFIG_KVM_GUEST=y
|
CONFIG_KVM_GUEST=y
|
||||||
|
|||||||
Reference in New Issue
Block a user