[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070802212307.GA521@tv-sign.ru>
Date: Fri, 3 Aug 2007 01:23:07 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Nigel Cunningham <nigel@...el.suspend2.net>,
Pavel Machek <pavel@....cz>,
pm list <linux-pm@...ts.linux-foundation.org>
Subject: Re: [PATCH -mm 2/3] Freezer: Use wait queue instead of busy looping (updated)
On 08/02, Rafael J. Wysocki wrote:
>
> On Thursday, 2 August 2007 20:40, Oleg Nesterov wrote:
> > On 08/02, Rafael J. Wysocki wrote:
> > >
> > > @@ -171,6 +186,10 @@ static int try_to_freeze_tasks(int freez
> > >
> > > end_time = jiffies + TIMEOUT;
> > > do {
> > > + DEFINE_WAIT(wait);
> > > +
> > > + add_wait_queue(&refrigerator_waitq, &wait);
> >
> > Hmm. In that case I'd sugest to use prepare_to_wait(). This means that
> > multiple wakeups from refrigerator() won't do unnecessary work,
>
> I'm not sure what you mean.
>
> Do you mean that if we are TASK_UNINTERRUPTIBLE, then the first wake up
> should remove us from the queue?
No, not because we are TASK_UNINTERRUPTIBLE, but yes, first wake up will
remove us because DEFINE_WAIT() uses autoremove_wake_function().
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists