[lkml]   [2005]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2.6.13-rc6-rt9] PI aware dynamic priority adjustment

On Fri, 2005-08-19 at 17:19 -0700, George Anzinger wrote:
> > 2. Drift of cyclic timers (armed by set_timer()):
> >
> > Due to rounding errors and the drift adjustment code, the fixed
> > increment which is precalculated when the timer is set up and added on
> > rearm, I see creeping deviation from the timeline.
> >
> > I have a patch lined up to base the rearm on human (nsac) units, so this
> > effect will go away. But this is waste of time until (1.) is not solved.
> >
> > George ???
> Could I (we) see what you have in mind?

Nothing which applies clean at the moment and I have no access to the
box where the patch floats around.

It's simply explained.

Current code:

calc interval->jiffies / interval->arch_cycles;
based on it.interval

timer->expires += interval->jiffies;
timer->arch_cycle_expires += interval->arch_cycles;

Patched code:

timer.interval = it.interval;
timer.next_expire = it.value;
both stored as timespec

next_expire += interval;
calc timer->expires/arch_cycle_expires;

So on each rearm we eliminate the rounding errors and take the drift
adjustment into account.

It adds some calculation overhead to each rearm, but ....


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-20 02:38    [W:0.166 / U:7.188 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site