Re: [PATCHv2 1/4] util: Introduce monitor capability interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 18, 2018 at 03:38:44PM -0400, John Ferlan wrote:
On 09/14/2018 09:30 PM, Wang Huaqiang wrote:
This patch introduces the resource monitor and creates the interface
for getting host capability of resource monitor from the system resource
control file system.

The resource monitor take the role of RDT monitoring group, could be

*takes...

s/, could/ and could/

used to monitor the resource consumption information, such as the last
level cache occupancy and the utilization of memory bandwidth.

Signed-off-by: Wang Huaqiang <huaqiang.wang@xxxxxxxxx>
---
 src/util/virresctrl.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 124 insertions(+)


[...]

+
+    rv = virFileReadValueUint(&info_monitor->max_monitor,
+                              SYSFS_RESCTRL_PATH "/info/L3_MON/num_rmids");
+    if (rv == -2) {
+        /* The file doesn't exist, so it's unusable for us, probably resource
+         * monitor unsupported */
+        VIR_INFO("The path '" SYSFS_RESCTRL_PATH "/info/L3_MON/num_rmids' "
+                 "does not exist");

Add virResetLastError()

[avoids having this error in Last and something else failing and spewing
the error]


The return value of -2 means no error was set, so there is nothing to do
here.

Also, virResetLastError is meant to be used before starting an API.
It only resets the thread-local error object (which can only contain one
error), it cannot possibly unlog an error that was logged earlier.
In that case, creating a Quiet version of the function is the proper
solution.

Jano

+        ret = 0;
+        goto cleanup;

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux