All of lore.kernel.org
 help / color / mirror / Atom feed
* Periodic timing varies across boots
@ 2019-02-24  6:57 C Smith
  2019-02-25  8:09 ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: C Smith @ 2019-02-24  6:57 UTC (permalink / raw)
  To: xenomai

I am using Xenomai 2.6.5, x86 32bit SMP kernel 3.18.20, Intel Core
i5-4460,  and I have found a periodic timing problem on one particular type
of motherboard.

I have a Xenomai RT periodic task which outputs a pulse to the PC parallel
port, and this pulse is measured on a frequency counter. This has been
working fine for years on several motherboards. I am able to adjust the
period of my task to within +/-10nsec, according to the frequency counter.
I can calibrate the periodic timing down to a period +/-10nsec on this
motherboard, and I cna restart my xenomai process many times and the timing
is fine. But if I cold-reboot the machine the measured period is wrong by
up to  +/-300nsec. Thus I cannot get consistent periodic timing from day to
day without recalibrating, which is unacceptable in my application.

In my kernel config, I am using the TSC: CONFIG_X86_TSC=y
I use rt_timer_read() to determine what time it is, and my periodic task
sleeps in a while loop, like this:
      next += period_ns + adjust_ns;
      rt_task_sleep_until(next);

I don't know what to test. Can you suggest anything?

Thanks,
-C Smith

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-08  6:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-24  6:57 Periodic timing varies across boots C Smith
2019-02-25  8:09 ` Jan Kiszka
2019-02-28  5:56   ` C Smith
2019-02-28  7:30     ` Philippe Gerum
2019-03-01  7:30       ` C Smith
2019-03-01  8:05         ` Philippe Gerum
2019-03-01  8:09           ` Philippe Gerum
2019-04-08  6:31             ` C Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.