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

[Xen-users] NOW() function the unit in xen scheduler

  • To: xen-users@xxxxxxxxxxxxx
  • From: 张伟 <zhangwqh@xxxxxxx>
  • Date: Tue, 9 Jul 2013 21:30:36 +0800 (CST)
  • Delivery-date: Tue, 09 Jul 2013 13:31:32 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hi, all

In xen code, some place will call NOW() function. Now I do not know how to know the unit for this function. 
There are two places given the definition for this function NOW()
one is xen-4.2.1/extras/mini-os/include/Time.h
In this file  xen-4.2.1/extras/mini-os/include/Time.h, from the comment NOW() the unit for time is 
/*System Time
64 bit value containing the nanoseconds elapsed since boot time.*/
the other is xen-4.2.1/xen/include/xen/Time.h
In xen schedule related places, they call the function NOW() in the xen-4.2.1/xen/include/xen/Time.h.

At first, I think  NOW() the unit for time in xen-4.2.1/xen/include/xen/Time.h file, should also nanosecond. 
However, From here, 
set_timer(&spc->ticker, NOW() + MICROSECS(prv->tick_period_us) ); In the function csched_alloc_pdata(), it seems the unit is microsecs. 

Now I am confused with it.

If someone knows the answer, please let me know. Thank you in advance!

Xen-users mailing list



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