On Thu, 17 Mar 2005, Nish Aravamudan wrote:

> > +       if (system_state != SYSTEM_RUNNING)
> > +               return;
> > +
> > +        while (avenrun[0] >= ((unsigned long)sysctl_scrub_load << FSHIFT))
> > +               schedule_timeout(30*HZ);
>
> This is a busy-loop, unless you set the state before you call
> schedule_timeout(). Additionally, you really want to sleep 30 seconds

Ahh. Missed that thanks.

> at a time? Please use msleep() or msleep_interruptible(), unless you
> expect wait-queue events.

I want to sleep 30 seconds because the system load is unlikely to change
frequently.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to