[libvirt] [PATCHv2 1/2] util, resctrl: using 64bit interface instead of 32bit for counters
Wang, Huaqiang
huaqiang.wang at intel.com
Tue Jan 7 02:06:02 UTC 2020
Hi Daniel,
Thanks for review!
Br
Huaqiang
> -----Original Message-----
> From: Daniel P. Berrangé <berrange at redhat.com>
> Sent: Monday, January 6, 2020 10:16 PM
> To: Wang, Huaqiang <huaqiang.wang at intel.com>
> Cc: libvir-list at redhat.com
> Subject: Re: [PATCHv2 1/2] util, resctrl: using 64bit interface instead of 32bit
> for counters
>
> On Thu, Jan 02, 2020 at 06:45:04PM +0800, Wang Huaqiang wrote:
> > The underlying resctrl monitoring is actually using 64 bit counters,
> > not the 32bit one. Correct this by using 64bit data type for reading
> > hardware value.
> >
> > To keep the interface consistent, the result of CPU last level cache
> > that occupied by vcpu processors of specific restrl monitor group is
> > still reported with a truncated 32bit data type. because, in silicon
> > world, CPU cache size will never exceed 4GB.
> >
> > Signed-off-by: Wang Huaqiang <huaqiang.wang at intel.com>
> > ---
> > src/qemu/qemu_driver.c | 15 +++++++++++++--
> > src/util/virfile.c | 40 ++++++++++++++++++++++++++++++++++++++++
> > src/util/virfile.h | 2 ++
> > src/util/virresctrl.c | 6 +++---
> > src/util/virresctrl.h | 2 +-
> > 5 files changed, 59 insertions(+), 6 deletions(-)
>
> Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
>
> > diff --git a/src/util/virfile.h b/src/util/virfile.h index
> > bcae40ee06..756c9a70b9 100644
> > --- a/src/util/virfile.h
> > +++ b/src/util/virfile.h
> > @@ -361,6 +361,8 @@ int virFileReadValueInt(int *value, const char
> *format, ...)
> > G_GNUC_PRINTF(2, 3);
> > int virFileReadValueUint(unsigned int *value, const char *format, ...)
> > G_GNUC_PRINTF(2, 3);
> > +int virFileReadValueUllong(unsigned long long *value, const char
> > +*format, ...) G_GNUC_PRINTF(2, 3);
>
> Also needs adding to libvirt_private.syms, which I did when pushing.
>
>
> Regards,
> Daniel
> --
> |: https://berrange.com -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o- https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o-
> https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list