Bug 1346723
Summary: | some bugs in function which used to parse perf event xml element | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | fjin, pkrempa, rbalakri, yalzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-2.0.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-03 18:47:04 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: |
Description
Luyao Huang
2016-06-15 08:51:25 UTC
Fixed upstream: commit 23690e1d74b3551eecb69e2187ed4089238a9838 Author: Peter Krempa <pkrempa> Date: Wed Jun 15 16:33:20 2016 +0200 conf: Fix perf event parser The parser was totaly broken. Fix it by rewriting it. Add tests so that it doesn't happen. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1346723 commit c22dad33c2b5e8a93d540715604784032783734f Author: Peter Krempa <pkrempa> Date: Wed Jun 15 16:31:19 2016 +0200 docs: Add at least some docs and fix schema entry for perf events There was no documentation at all for the XML part. I added at least some. The 2.0.0 introduction date is deliberate as the parser for the XML is broken. The schema file was missing entries for 'mbml' and 'mbmt'. Hi Peter, Test on libvirt-2.0.0-1.el7.x86_64, the 'mbmt' and 'mbml' pass the xml validate. But the guest can not start with a mbmt or mbml set to enable, If there is any restriction? # virsh dumpxml rhel7.2 | grep /perf -B4 <perf> <event name='cmt' enabled='no'/> <event name='mbmt' enabled='yes'/> <event name='mbml' enabled='no'/> </perf> # virsh start rhel7.2 error: Failed to start domain rhel7.2 error: Unable to open perf type=26 for pid=24570: Invalid argument # virsh perf rhel7.2 --enable mbml --disable cmt,mbmt # virsh perf rhel7.2 cmt : disabled mbmt : disabled mbml : enabled # virsh start rhel7.2 error: Failed to start domain rhel7.2 error: Unable to open perf type=26 for pid=24633: Invalid argument # virsh perf rhel7.2 --enable cmt --disable mbml,mbmt # virsh start rhel7.2 Domain rhel7.2 started # virsh perf rhel7.2 --enable cmt,mbml --disable mbmt error: Unable to enable/disable perf events error: Unable to open perf type=26 for pid=24713: Invalid argument Sorry, Commet 3 is test on a machine with CPU E5-2620 v3, which do not support mbm and just support cmt. I will reserve a machine with E5-2600 v4 CPU and retest this bug. Hi Peter, Could you please help to confirm if below results is expected? 1. After restart libvirtd, the perf.cmt, perf.mbmt and perf.mbml may be '0' # virsh domstats rhel7.2 --perf Domain: 'rhel7.2' perf.cmt=19087360 perf.mbmt=77168640 perf.mbml=67788800 # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh domstats rhel7.2 --perf Domain: 'rhel7.2' perf.cmt=122880 perf.mbmt=122880 perf.mbml=0 2. Besides, if the host do not support the cmt, mbm, the error message when start the guest is just like comment 3. If we can update the error message to something more clearly, such as "mbml/cmt/mbmt is not supported by the host CPU"? Test on a machine with cpu "Intel(R) Xeon(R) CPU E5-2640 v4". Both cmt, mbmt and mbml can be parsed correctly and pass xml validate. Add below lines in the guest's xml <perf> <event name='cmt' enabled='yes'/> <event name='mbmt' enabled='yes'/> <event name='mbml' enabled='yes'/> </perf> # virsh edit rhel7.2 Domain rhel7.2 XML configuration not changed. # virsh dumpxml rhel7.2 | grep /perf -B4 <perf> <event name='cmt' enabled='yes'/> <event name='mbmt' enabled='yes'/> <event name='mbml' enabled='yes'/> </perf> # virsh start rhel7.2 Domain rhel7.2 started # virsh perf rhel7.2 cmt : enabled mbmt : enabled mbml : enabled # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh list Id Name State ---------------------------------------------------- 20 rhel7.2 running # virsh domstats rhel7.2 --perf Domain: 'rhel7.2' perf.cmt=81920 perf.mbmt=819200 perf.mbml=450560 (In reply to yalzhang from comment #5) > Hi Peter, > Could you please help to confirm if below results is expected? > > 1. After restart libvirtd, the perf.cmt, perf.mbmt and perf.mbml may be '0' > # virsh domstats rhel7.2 --perf > Domain: 'rhel7.2' > perf.cmt=19087360 > perf.mbmt=77168640 > perf.mbml=67788800 > # service libvirtd restart > Redirecting to /bin/systemctl restart libvirtd.service > # service libvirtd restart > Redirecting to /bin/systemctl restart libvirtd.service > # virsh domstats rhel7.2 --perf > Domain: 'rhel7.2' > perf.cmt=122880 > perf.mbmt=122880 > perf.mbml=0 I unfortunately don't really know how that is supposed to work. > 2. Besides, if the host do not support the cmt, mbm, the error message when > start the guest is just like comment 3. If we can update the error message > to something more clearly, such as "mbml/cmt/mbmt is not supported by the > host CPU"? It might be worth to do so. As that isn't a critical issue I'd suggest you file a new bug for this since otherwise I'll probably forget about it. (In reply to Peter Krempa from comment #6) > (In reply to yalzhang from comment #5) > > Hi Peter, > > Could you please help to confirm if below results is expected? > > > > 1. After restart libvirtd, the perf.cmt, perf.mbmt and perf.mbml may be '0' > > 2. Besides, if the host do not support the cmt, mbm, the error message when > > start the guest is just like comment 3. If we can update the error message > > to something more clearly, such as "mbml/cmt/mbmt is not supported by the > > host CPU"? > > It might be worth to do so. As that isn't a critical issue I'd suggest you > file a new bug for this since otherwise I'll probably forget about it. File a bug Bug 1360533 - The error message need to improve when enable a perf event on a host which do not support it 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/RHSA-2016-2577.html |