[libvirt] [PATCH 1/5] util, resctrl: using 64bit interface instead of 32bit for counters

Daniel P. Berrangé berrange at redhat.com
Mon Dec 16 10:12:49 UTC 2019


On Sun, Dec 15, 2019 at 02:39:20AM +0000, Wang, Huaqiang wrote:
> Hi Daniel,
> 
> Thanks for your review. 
> 
> About patch 1/5, I understand we should be very cautious when we changes  the determined
> interface. 
> 
> I'd like to reserved the old 32bit interface  and propose a new 64bit interface just as you
> suggested if you still think so after you  got my intention. 
> Here actually I want to fix a bug, maybe I should title this patch as *bug fixing*. Reason is the
> underlying hardware, the cache monitor and memory bandwidth counters, are 64bit width.
> Using 32bit interface to access these counters are problematic. This bug is not found because
> this interface is only used for tracking the amount of cache that used before this patch, normally
> the occupied cache will not exceed 4GB range. (32bit counter can counter value up to 4GB).
> But for memory, this counter records the data passing through the memory controller issued
> by this CPU in bytes and accumulatively, this value can easily exceed the 4GB bound, so I
> don’t want to reserve the old 32 bit interface and let user use it, because it will report incorrect value.

We simply have to document the limitati onof the old interface. We can
*NOT* change it, because it WILL break API compatibility for apps that
deserailize the current data.


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