-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5827 from nanli1/add_case_for_virtio_mem_with_num…
…a_tuning add case for virtio mem with numa node tunning
- Loading branch information
Showing
3 changed files
with
538 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
libvirt/tests/cfg/memory/memory_devices/virtio_memory_with_numa_node_tuning.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
- memory.devices.virtio.with_numa_tuning: | ||
no s390-virtio | ||
type = virtio_memory_with_numa_node_tuning | ||
start_vm = "yes" | ||
mem_model = "virtio-mem" | ||
allocate_huge_mem = "1048576KiB" | ||
allocate_huge_mem_1 = "2097152KiB" | ||
hugepage_path = "/dev/hugepages-%s" | ||
kernel_hp_tmpl_file = "/sys/devices/system/node/node%s/hugepages/hugepages-%skB/nr_hugepages" | ||
memory_backing_dict = "'mb': {'hugepages': {'pages': [{'size': '%s','unit': 'KiB','nodeset':'0'}]}}" | ||
base_attrs = "'vcpu': 4, 'memory_unit':'KiB','memory':2097152,'current_mem':2097152" | ||
numa_attrs = "'cpu': {'numa_cell': [{'id': '0', 'cpus': '0-1', 'memory': '1048576', 'unit': 'KiB'},{'id':'1','cpus': '2-3','memory':'1048576','unit':'KiB'}]}" | ||
max_attrs = "'max_mem_rt': 15242880, 'max_mem_rt_slots': 16" | ||
required_kernel = [5.14.0,) | ||
guest_required_kernel = [5.8.0,) | ||
func_supported_since_libvirt_ver = (8, 0, 0) | ||
func_supported_since_qemu_kvm_ver = (6, 2, 0) | ||
variants numa_tuning: | ||
- strict: | ||
tuning_mode = "strict" | ||
mode_attrs = "'numa_memory': {'mode': '${tuning_mode}','nodeset': '%s'}," | ||
memnode_mode = "interleave" | ||
numa_memnode = "'numa_memnode':[{'cellid': '0', 'mode': '${memnode_mode}', 'nodeset': '%s'}]" | ||
- interleave: | ||
tuning_mode = "interleave" | ||
mode_attrs = "'numa_memory': {'mode': '${tuning_mode}','nodeset': '%s'}," | ||
memnode_mode = "preferred" | ||
numa_memnode = "'numa_memnode':[{'cellid': '0', 'mode': '${memnode_mode}', 'nodeset': '%s'}]" | ||
- preferred: | ||
tuning_mode = "preferred" | ||
memnode_mode = "strict" | ||
mode_attrs = "'numa_memory': {'mode': '${tuning_mode}','nodeset': '%s'}," | ||
numa_memnode = "'numa_memnode':[{'cellid': '0', 'mode': '${memnode_mode}', 'nodeset': '%s'}]" | ||
- undefined: | ||
mode_attrs = "" | ||
numa_memnode = "" | ||
tuning_attrs = "${mode_attrs}${numa_memnode}" | ||
vm_attrs = {${memory_backing_dict},${base_attrs}, ${numa_attrs}, ${max_attrs}, ${tuning_attrs}} | ||
variants case: | ||
- with_source_virtio_mem: | ||
request_size = 1048576 | ||
target_size = 1048576 | ||
virtio_mem_1 = {'mem_model': '${mem_model}', 'source': {'nodemask': '1', 'pagesize': %s, 'pagesize_unit': 'KiB'},'target': {'size': ${target_size}, 'node': 1, 'requested_size': ${request_size}, 'block_size': %s}} | ||
virtio_mem_2 = {'mem_model': '${mem_model}', 'source': {'nodemask': '0', 'pagesize': %s, 'pagesize_unit': 'KiB'},'target': {'size': ${target_size}, 'node': 0, 'requested_size': ${request_size}, 'block_size': %s}} | ||
virtio_mem_list = [${virtio_mem_1}, ${virtio_mem_2}] | ||
- no_source_virtio_mem: | ||
target_size_1 = 524288 | ||
kernel_extra_params_add = "memhp_default_state=online_movable" | ||
virtio_mem_1 = {'mem_model': '${mem_model}', 'target': {'size': ${target_size_1}, 'node': 1, 'requested_size': 524288, 'block_size': %s}} | ||
virtio_mem_2 = {'mem_model': '${mem_model}', 'target': {'size': 1048576, 'node': 0, 'requested_size': 1048576, 'block_size': %s}} | ||
virtio_mem_list = [${virtio_mem_1}, ${virtio_mem_2}] | ||
- requested_bigger_than_host_numa: | ||
request_size = 2097152 | ||
target_size = 2097152 | ||
virtio_mem_list = [{'mem_model': '${mem_model}', 'target': {'size': ${target_size}, 'node': 0, 'requested_size': ${request_size}, 'block_size':%s}}] | ||
variants operation: | ||
- cold_plug: | ||
attach_option = "--config" | ||
- hot_plug: | ||
attach_option = " " |
Oops, something went wrong.