-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netperf: implements dynamic NUMA binding #4252
base: master
Are you sure you want to change the base?
Conversation
Test cases didn't pass but the error is not related with this patch
|
@heywji could you review this PR? Thanks ! |
LGTM. Thanks to Mario's efforts and help. Hello, other reviewers. Let me explain some background here. The netperf of my netkvm test loop is netperf_stress_test.cfg. But someday I type the test case name as 'netperf', some errors reported. After talking with @mcasquer, we confirmed it was because of the NUMA node memory issue. It's an actual NUMA issue improvement, even though it is not directly connected with my netkvm test loop. |
generic/tests/netperf.py
Outdated
mem = int(params["mem"]) | ||
mem_kb = mem * 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it outside loop, don't need to calculate the memory size for each loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code updated, thank you !
mem = int(params["mem"]) | ||
mem_kb = mem * 1024 | ||
if node_mem_free > mem_kb: | ||
pinned_node = node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add break to break the loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks !
generic/tests/netperf.py
Outdated
vm = env.get_vm(vm_name) | ||
vm.verify_alive() | ||
except virt_vm.VMCreateError: | ||
test.error("Not enough memory on the nodes to create the VM") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to check error message includes related info before test.error, to avoid other risks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PaulYuuu what do you mean? Including a log trace with the info from the exception instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the VM creation failed because of other issues(assert, missing args, others), that should not be a memory problem, but here you assume it fails by insufficient memory for all exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the idea, please tell me if now looks better, I don't have this kind of host for test it 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test.error/cancel depends on you, or find the message to match expected info first, if matched, cancel it, otherwise raise error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code updated and tested the cancel case by hard coding the node:
(1/3) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win10.x86_64.io-github-autotest-qemu.netperf.with_jumbo.host_guest.q35: STARTED
(1/3) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win10.x86_64.io-github-autotest-qemu.netperf.with_jumbo.host_guest.q35: CANCEL: The node: 7 used for VM pinning is not valid (23.93 s)
dc7d668
to
3f7f334
Compare
@heywji please, whenever is possible, could you test the latest patch changes? I saw in your host some QEMU and avocado processes running already... thanks ! |
3f7f334
to
ed6a152
Compare
The test was taking the last NUMA node to bind the VM's memory. In some systems the last NUMA node could have no memory and/or CPUs assigned, updates the test to take the first valid node. Signed-off-by: mcasquer <mcasquer@redhat.com>
ed6a152
to
8bccd82
Compare
LGTM
|
netperf: implements dynamic NUMA binding
The test was taking the last NUMA node to
bind the VM's memory. In some systems the last
NUMA node could have no memory and/or CPUs
assigned, updates the test to take the first
valid node.
Signed-off-by: mcasquer mcasquer@redhat.com
ID: 3321