[libvirt] [PATCHv2 1/4] util: Introduce monitor capability interface
Ján Tomko
jtomko at redhat.com
Fri Oct 5 14:42:18 UTC 2018
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 at 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20181005/450134e3/attachment-0001.sig>
More information about the libvir-list
mailing list