• Paolo Bonzini's avatar
    kvm: stats: tell userspace which values are boolean · 1b870fa5
    Paolo Bonzini authored
    Some of the statistics values exported by KVM are always only 0 or 1.
    It can be useful to export this fact to userspace so that it can track
    them specially (for example by polling the value every now and then to
    compute a % of time spent in a specific state).
    
    Therefore, add "boolean value" as a new "unit".  While it is not exactly
    a unit, it walks and quacks like one.  In particular, using the type
    would be wrong because boolean values could be instantaneous or peak
    values (e.g. "is the rmap allocated?") or even two-bucket histograms
    (e.g. "number of posted vs. non-posted interrupt injections").
    Suggested-by: default avatarAmneesh Singh <natto@weirdnatto.in>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    1b870fa5
api.rst 273 KB