lkml.org 
[lkml]   [2005]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Prezeroing V8
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.750 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site