mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-06 21:05:18 +00:00
1da2abf4b5
This commit renames `ram_region_sub_size` to `ram_region_available_size` and make its value align down to the default page size or hugepage size of the current memory zone, which can prevent the memory zone from being split into misaligned parts. And if the available size of ram region is zero, this region will be marked as consumed even it has unused space. Note that there is two methods to use hugepages. 1. Specify `hugepages` for `memory` or `memory-zone`, if the `hugepage_size` is not specified, the value can be got by `statfs` for `/dev/hugepages`. 2. Specify a `file` in hugetlbfs for `memory-zone`, the hugepage size can also be got by `statfs` for the file. The value for alignment will be the hugepage size if this memory zone is using hugepages, otherwise the value will be default page size of system. Fixes: #5463 Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |