lkml.org 
[lkml]   [2005]   [Mar]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 17 Mar 2005 21:43:17 -0800
FromNish Aravamudan <>
SubjectRe: [PATCH] Prezeroing V8 + free_hot_zeroed_page + free_cold_zeroed page
On Thu, 17 Mar 2005 18:09:11 -0800 (PST), Christoph Lameter
<clameter@sgi.com> wrote:
> On Thu, 17 Mar 2005, Jason Uhlenkott wrote:
> 
> > On Thu, Mar 17, 2005 at 05:36:50PM -0800, Christoph Lameter wrote:
> > > +        while (avenrun[0] >= ((unsigned long)sysctl_scrub_load << FSHIFT)) {
> > > +           set_current_state(TASK_UNINTERRUPTIBLE);
> > > +           schedule_timeout(30*HZ);
> > > +   }
> >
> > This should probably be TASK_INTERRUPTIBLE.  It'll never actually get
> > interrupted either way since kernel threads block all signals, but
> > sleeping uninterruptibly contributes to the load average.
> 
> Correct. .... I just do not seem to be able to get this right.

I think msleep_interruptible(30000) would be your best choice, then. 
Maybe with a comment that you don't actually expect signals, but are
using TASK_INTERRUPTIBLE to avoid contributing to load average (that
way, if the loadavg calculation changes someday, somebody will be able
to change your sleep over appropriately).
Thanks,
Nish
-
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    [from the cache]
©2003-2008