[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [BUG] xenstat_vcpu_ns returns invalid value


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Richard Kojedzinszky <richard@xxxxxxxxx>
  • Date: Thu, 09 Jan 2020 20:40:59 +0100
  • Delivery-date: Thu, 09 Jan 2020 19:43:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Dear Xen Devs,

commit 2529c850ea48f036727ca2f148caed89391311b8 introduces the XEN_RUNSTATE_UPDATE marker bit, which is not handled in
vcpu_runstate_get() in xen/common/schedule.c. Relevant code:

    delta = NOW() - runstate->state_entry_time;
    if ( delta > 0 )
        runstate->time[runstate->state] += delta;

If state_entry_time has the bit set, it will be a negative value, so delta will be greater than 0, actually the marker bit will appear in runstate->time too. This causes the MSB bit set in the return of xenstat_vcpu_ns(). Is it true, that when reading these values through xenstat, the user should take care of this bit, and reread, or is it a bug in the relevant code?

I am using xenstat.h interface, where I can only request statistics for the whole node. So, basically, walking through all vcpu of all domain, and checking that no one
contains this bit seems a bit ugly solution.

Thanks in advance,
Richard Kojedzinszky

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.