Re: dynamic-hz

Nish Aravamudan
2004-12-14T04:15:43Z

On Mon, 13 Dec 2004 17:12:07 +0100, Pavel Machek <pavel@suse.cz> wrote:
> HI!
>
> > > I'm not sure what the above "scedule_timeout(HZ/10)" is supposed to
> > > do, but the parameter it gets in 1000hz is "100" so I assume this
> > > is because we want to wait for 100ms, and in 1000hz that equals
> > > 100 cycles. Correct?
> >
> > `schedule_timeout(HZ/x)' lets it wait for 1/x'th second.
>
> ...small problem is that for HZ lower than x it does not wait at all
> :-(.

Ah ha! Another reason to use msleep() or msleep_interruptible() :).
Or, if you just want to give up the CPU, use schedule(); or if, giving
up the CPU for a long time, use yield() [the current semantic
interpretation of yield()].

-Nish