Bug 1248406
Summary: | Numa node assignation info is not consistency between hmp and in guest | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Zhengtong <zhengtli> |
Component: | qemu-kvm-rhev | Assignee: | David Gibson <dgibson> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | ehabkost, hannsj_uhl, jen, knoel, lvivier, michen, mrezanin, qzhang, thuth, virt-maint, zhengtli |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | ppc64le | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | qemu-2.4 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-07 20:31:20 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1359843 |
Description
Zhengtong
2015-07-30 08:45:24 UTC
qemu seems to be doing something really strange here - it is describing the vcpus as alternating between nodes. Since vcpus 0 & 1 are different threads on the same guest core, it makes no sense for them to be in different nodes. There's not even a way to describe them as being in different nodes to the guest, which is why they show up in the same node in the guest. Ok.. I see the code that does this in numa.c. Looks like we need to implement a cpu_index_to_socket_id callback for Power. Although frankly the qemu default behaviour is very odd. I've sent a draft upstream patch for discussion with the NUMA maintainer. Also adding Eduardo on CC for context. A final fix needs some discussion with upstream maintainers. However, to check my reasoning, can you try the draft fix which I've built at: https://brewweb.devel.redhat.com/taskinfo?taskID=9621483 (In reply to David Gibson from comment #4) > A final fix needs some discussion with upstream maintainers. However, to > check my reasoning, can you try the draft fix which I've built at: > > https://brewweb.devel.redhat.com/taskinfo?taskID=9621483 Hi David, I tried with the test package and here is the result: /usr/libexec/qemu-kvm \ ... -smp 4,sockets=1,cores=2,threads=2 \ ... (qemu) info numa 2 nodes node 0 cpus: 0 1 2 3 node 0 size: 2048 MB node 1 cpus: node 1 size: 2048 MB [root@dhcp71-14 ~]# numactl -H available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 node 0 size: 2048 MB node 0 free: 361 MB node 1 cpus: node 1 size: 2048 MB node 1 free: 2027 MB node distances: node 0 1 0: 10 10 1: 10 10 And another result /usr/libexec/qemu-kvm \ ... -smp 16,sockets=1,cores=2,threads=8 \ ... (qemu) info numa 2 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 node 0 size: 2048 MB node 1 cpus: node 1 size: 2048 MB [root@dhcp71-14 ~]# numactl -H available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 node 0 size: 2048 MB node 0 free: 259 MB node 1 cpus: node 1 size: 2048 MB node 1 free: 2023 MB node distances: node 0 1 0: 10 10 1: 10 10 It seams like the dis-consistence problems is resolved, but obviously , all the cpus are assigned to node0, is this supposed to be, or another bug is caused? My tentative patch allocates vcpus to numa nodes at "socket" granularity. Because you've only declared one socket, all the vcpus will be in one numa node, so the behaviour you see is expected. The fix for this is now upstream and will be in qemu 2.4. Therefore, we'll pick it up for RHEL7.3 on the rebase. This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions Tried with the latest qemu version : qemu-kvm-rhev-2.6.0-4.el7. The result is passed. 1. Boot up guest with cmd: /usr/libexec/qemu-kvm ... -smp 4,sockets=1,cores=2,threads=2 \ -numa node,nodeid=0 -numa node,nodeid=1 \ ... 2. After guest boot up , check the numa info from hmp and in guest: ------------------------------- (qemu) info numa 2 nodes node 0 cpus: 0 1 2 3 node 0 size: 4096 MB node 1 cpus: node 1 size: 4096 MB (qemu) ------------------------------- [root@dhcp70-245 ~]# numactl -H available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 node 0 size: 4096 MB node 0 free: 2072 MB node 1 cpus: node 1 size: 4096 MB node 1 free: 4060 MB node distances: node 0 1 0: 10 40 1: 40 10 -------------------------------- The results are consistence 3. Tried again with this cmd: /usr/libexec/qemu-kvm ... -smp 4,sockets=2,cores=2,threads=1 \ -numa node,nodeid=0 -numa node,nodeid=1 \ ... and get the result as follows: -------------------------------- (qemu) info numa 2 nodes node 0 cpus: 0 1 node 0 size: 4096 MB node 1 cpus: 2 3 node 1 size: 4096 MB (qemu) --------------------------------- [root@dhcp70-245 ~]# numactl -H available: 2 nodes (0-1) node 0 cpus: 0 1 node 0 size: 4096 MB node 0 free: 2633 MB node 1 cpus: 2 3 node 1 size: 4096 MB node 1 free: 3482 MB node distances: node 0 1 -------------------------------- That is goood. 0: 10 40 1: 40 10 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2673.html |