mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-02 11:35:46 +00:00
docs: Update documentation for hugepage_size option
Including a warning that the user is respsonsible for ensuring that they have sufficient pages of the specified size. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
29607f38ad
commit
b5fb744828
@ -15,6 +15,7 @@ struct MemoryConfig {
|
|||||||
mergeable: bool,
|
mergeable: bool,
|
||||||
shared: bool,
|
shared: bool,
|
||||||
hugepages: bool,
|
hugepages: bool,
|
||||||
|
hugepage_size: Option<u64>,
|
||||||
hotplug_method: HotplugMethod,
|
hotplug_method: HotplugMethod,
|
||||||
hotplug_size: Option<u64>,
|
hotplug_size: Option<u64>,
|
||||||
hotplugged_size: Option<u64>,
|
hotplugged_size: Option<u64>,
|
||||||
@ -76,23 +77,24 @@ _Example_
|
|||||||
--memory size=1G,shared=on
|
--memory size=1G,shared=on
|
||||||
```
|
```
|
||||||
|
|
||||||
### `hugepages`
|
### `hugepages` and `hugepage_size`
|
||||||
|
|
||||||
Specifies if the memory must be `mmap(2)` with `MAP_HUGETLB` and `MAP_HUGE_2MB`
|
Specifies if the memory must be created and `mmap(2)` with `MAP_HUGETLB` and size
|
||||||
flags. This performs a memory mapping relying on 2MiB pages instead of the
|
flags. This performs a memory mapping relying on the specified huge page size. If no huge page size is supplied the system's default huge page size is used.
|
||||||
default 4kiB pages.
|
|
||||||
|
|
||||||
By using hugepages, one can improve the overall performance of the VM, assuming
|
By using hugepages, one can improve the overall performance of the VM, assuming
|
||||||
the guest will allocate hugepages as well. Another interesting use case is VFIO
|
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
|
as it speeds up the VM's boot time since the amount of IOMMU mappings are
|
||||||
reduced.
|
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.
|
||||||
|
|
||||||
By default this option is turned off.
|
By default this option is turned off.
|
||||||
|
|
||||||
_Example_
|
_Example_
|
||||||
|
|
||||||
```
|
```
|
||||||
--memory size=1G,hugepages=on
|
--memory size=1G,hugepages=on,hugepage_size=2M
|
||||||
```
|
```
|
||||||
|
|
||||||
### `hotplug_method`
|
### `hotplug_method`
|
||||||
|
Loading…
Reference in New Issue
Block a user