From 9106afae3858227bccdae19cc94b920a0f6a7b81 Mon Sep 17 00:00:00 2001 From: Yu Li Date: Mon, 26 Jul 2021 17:43:44 +0800 Subject: [PATCH] docs: Add more information of hugepages. Add missing option of hugepage_size in argument of memory, and add some details about lacking huge pages. Signed-off-by: Yu Li --- docs/memory.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/memory.md b/docs/memory.md index 268ab21b2..c3bed5f9c 100644 --- a/docs/memory.md +++ b/docs/memory.md @@ -24,7 +24,7 @@ struct MemoryConfig { ``` ``` ---memory Memory parameters "size=,mergeable=on|off,shared=on|off,hugepages=on|off,hotplug_method=acpi|virtio-mem,hotplug_size=,hotplugged_size=" +--memory Memory parameters "size=,mergeable=on|off,shared=on|off,hugepages=on|off,hugepage_size=,hotplug_method=acpi|virtio-mem,hotplug_size=,hotplugged_size=" ``` ### `size` @@ -87,7 +87,9 @@ the guest will allocate hugepages as well. Another interesting use case is VFIO as it speeds up the VM's boot time since the amount of IOMMU mappings are reduced. -The user is responsible for ensuring there are sufficient huge pages of the specified size for the VMM to use. Failure to do so may result in strange VMM behaviour. +The user is responsible for ensuring there are sufficient huge pages of the specified size for the VMM to use. +Failure to do so may result in strange VMM behaviour, e.g. error with `ReadKernelImage` is common. +If there is a strange error with `hugepages` enabled, just disable it or check whether there are enough huge pages. By default this option is turned off. @@ -469,4 +471,4 @@ _Example_ Cloud Hypervisor supports only one PCI bus, which is why it has been tied to the NUMA node 0 by default. It is the user responsibility to organize the NUMA nodes correctly so that vCPUs and guest RAM which should be located on the same -NUMA node as the PCI bus end up on the NUMA node 0. \ No newline at end of file +NUMA node as the PCI bus end up on the NUMA node 0.