Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Changing TICKSPERSEC
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 28th July 17:17
kirk lewis
External User
 
Posts: 1
Default Changing TICKSPERSEC



I noticed that earlier someone posted a question about high resolution
timer support, and the option of changing the clock tick rate. I've
been experimenting with this and have set the clock rate at 1ms (1000).
This is the procedure that was given to me by Lynxos support for
changing the tick rate:

(1) modifiy TICKSPERSEC in /usr/include/conf.h
(2) modify _TICKSPERSEC in /usr/include/time.h
(3) go to /sys/lynx.os and do 'touch CONFIG.TBL' and 'touch uparam.h'
otherwise you will not recompile some kernel files because the
Makefile has no dependencies on /usr/include/***x.
(4) rebuild a new kernel with 'make install'

We've been testing this on the PPC8A. So far the only issue uncovered
has been with NTP and its use of adjtime. According to LynxOS support
the adjtime.o file included with the PPC Lynxos release has trouble
with tick rates over 500. This issue was resolved with the x86
releases, but the change was not carried over to the PPC platform. If
you are planning on changing the tick rate on the PPC distribution,
then I recommend you contact Lynxos support and ask for the adjtime
fix. They'll send you an adjtime.o file along with instructions on how
to recompiled it into the Lynxos kernel.

While you can certainly work around a "slow" tick rate such as the
default one for Lynxos, having a tick rate of 1ms can make your system
much more deterministic, especially if you are using signals and sleep.
The trade off is more interrupt/context switching overhead.
  Reply With Quote


  sponsored links


2 28th July 17:17
kirk lewis
External User
 
Posts: 1
Default Changing TICKSPERSEC



I wanted to update this because we have found a problem with changing
TICKSPERSEC. When combined with the auxilary timer driver, which
interrupts every 100uS, there is a significant change in system
performance. I haven't benchmarked things to get an exact figure, but I
have been testing with NTP. NTP has to change its PPM from 15 to 125
when the timer driver is loaded, and is much less percise. Apparently
the extra interrupts pushes things over the edge.
  Reply With Quote
3 28th July 17:17
s.cateland
External User
 
Posts: 1
Default Changing TICKSPERSEC


This may be considered as expected.
since each time the Clock IRQ and your additionnal timer is raised the
system calls Interrupt Service Routine. while system is in ISR sytem
cannot be interrupted and since you increase both the frequency of
ClockInt and add a high frequency timer your system will spend
significant amount of time in those ISR. (this can be measured within
spyker)

It is usually adviced to either add a hardware timer (your auxiliary
timer)
and use it for higher precision timer or increase TICKSPERSEC
frequency.

Stephane
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666