Re: HZ question

Tim Schmielau
2005-09-13T16:01:38Z

On Tue, 13 Sep 2005, Mark Hounschell wrote:

> On a 100HZ kernel ANY requested delay via udelay or
> pthread_cond_timedwait of less than 10000usecs is unreliable and the the
> actual results are totally unacceptable.
>
> On a 1000HZ kernel the number is 1000 usecs.
>
> I'm not asking the kernel running at 1000hz to actually give me 500 usec
> delay if I ask. I do expect it to be at least 500 usec and within +- a
> single HZ however.

The kernel just cannot guarantee the latter. Rounding is only one of
many issues here.
Do you also want to know about CONFIG_PREEMPT, SMP, current load, future
load in order to estimate the delay you want to ask for?

OTOH, I'm not a soft real-time expert, so I'll stop commenting here.

Tim