Re: dynamic-hz

Domen Puncer
2004-12-14T10:02:37Z

On 13/12/04 19:54 -0800, Nish Aravamudan wrote:
> On Mon, 13 Dec 2004 03:25:21 -0800, Andrew Morton <akpm@osdl.org> wrote:
> > Andrea Arcangeli <andrea@suse.de> wrote:
> > >
> > > The patch only does HZ at dynamic time. But of course it's absolutely
> > > trivial to define it at compile time, it's probably a 3 liner on top of
> > > my current patch ;). However personally I don't think the three liner
> > > will worth the few seconds more spent configuring the kernel ;).
> >
> > We still have 1000-odd places which do things like
> >
> > schedule_timeout(HZ/10);
>
...
> Many drivers use
>
> set_current_state(TASK_{UN,}INTERRUPTIBLE);
> schedule_timeout(1); // or some other small value < 10
>
...
> If they really meant to use schedule_timeout(1) in the sense of
> highest resolution delay possible (the latter above), then they
> probably should just call schedule() directly.

Um... no (and you should remember this from our discussions), schedule()
gives up cpu until waitqueue wakeup or signal is received, and that can
be a really long delay :-)

Domen