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

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



Thank you very much! At first, I did not carefully read these macros and I have a misunderstanding- at first I thought these  macros change the unit to related unit. Eg, #define MICROSECS(_us)          (((s_time_t)(_us)) * 1000UL ) change to microsecs. 

Thank you for your guidance. These macros change from the related unit to nano.






在 2013-07-09 21:53:31,"jinho hwang" <hwang.jinho@xxxxxxxxx> 写道: >On Tue, Jul 9, 2013 at 9:30 AM, 张伟 <zhangwqh@xxxxxxx> wrote: >> 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. > >#define MICROSECS(_us)          (((s_time_t)(_us)) * 1000UL ) > >To nanosecond... > >> >> Now I am confused with it. >> >> If someone knows the answer, please let me know. Thank you in advance! >> >> >> >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@xxxxxxxxxxxxx >> http://lists.xen.org/xen-users > >_______________________________________________ >Xen-users mailing list >Xen-users@xxxxxxxxxxxxx >http://lists.xen.org/xen-users


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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