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

[Xen-devel] The idle time of the physical cpu in xen kernel


  • To: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Bei Guan <gbtju85@xxxxxxxxx>
  • Date: Wed, 16 Jul 2014 17:37:45 +0800
  • Delivery-date: Wed, 16 Jul 2014 09:37:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hi,

I have a question about the method get_cpu_idle_time() in xen/common/schedule.c. The implementation of this method is attached. I don't understand why the idle time of a pcpu is the RUNSTATE_running time of a vcpu?

I'm looking forward to your reply. Thanks a lot for your help.


176 uint64_t get_cpu_idle_time(unsigned int cpu)
177 {
178 struct vcpu_runstate_info state = { 0 };
179 struct vcpu *v = idle_vcpu[cpu];
181 if ( cpu_online(cpu) && v )
182 vcpu_runstate_get(v, &state);
184 return state.time[RUNSTATE_running];

Also see http://xenbits.xensource.com/hg/xen-unstable.hg/file/7a69d32bc8d0/xen/common/schedule.c




--
Best Regards,
Bei
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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