Re: No 100 HZ timer !

Oliver Xymoron
2001-08-02T14:39:50Z

On Wed, 1 Aug 2001, george anzinger wrote:

> > Never set the next hit of the timer to (now + MIN_INTERVAL).
>
> The overhead under load is _not_ the timer interrupt, it is the context
> switch that needs to set up a "slice" timer, most of which never
> expire. During a kernel compile on an 800MHZ PIII I am seeing ~300
> context switches per second (i.e. about every 3 ms.) Clearly the
> switching is being caused by task blocking. With the ticked system the
> "slice" timer overhead is constant.

Can you instead just not set up a reschedule timer if the timer at the
head of the list is less than MIN_INTERVAL?

if(slice_timer_needed)
{
if(time_until(next_timer)>TASK_SLICE)
{
next_timer=jiffies()+TASK_SLICE;
add_timer(TASK_SLICE);
}
slice_timer_needed=0;
}

--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."