Re: Timers not working as expected

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

 



Hi Ankit,

How did you measure the 2500 microsecond interval?

The timeval structure should give you a proper microsecond resolution BUT, the accuracy of the timer is normally limited by the software clock (100, 250, 300, 1000 Hz). If a timer expiration value does not match a multiple of the jiffies you set the system clock as a kernel compilation option, you get rounding errors.

Also in kernels prior to 2.6.21 (where you can see the CONFIG_HIGH_RES_TIMERS kernel config option), you could have some conditions depending on system age (clock) and load or scheduler issues, where you see these deviations. If you switch to 2.6.21, you should get proper high resolution timing and if you combine that with modern (last 3 years) hardware, you should really be able to schedule accurately down to microsec resolution.

GM

Best regards,

--
--
George Magklaras PhD
RHCE no: 805008309135525

Senior Systems Engineer/IT Manager
Biotechnology Center of Oslo and
the Norwegian Center for Molecular Medicine
EMBnet TMPC Chair

http://folk.uio.no/georgios




On 05/30/2012 10:10 AM, Ankit Mahawar wrote:
Hi All,

My kernel version is  2.6.14 with high resolution subsystem core having
linux hrtimer patch  with commit id
c0a3132963db68f1fbbd0e316b73de100fee3f08

I had set a timer which expired  every 0.5 sec using setitimer api  .

I  noticed that  timers were expiring fast enough at a continuous basis ,
expiring at around 2500 micro sec interval.

Has anyone encountered this scenario before  ?

Please help to understand the case in which it might occur .

Thanks
Ankit

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you





--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux