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(a)intel.com>
> ---
> 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;