[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200707070056.22560.rjw@sisk.pl>
Date: Sat, 7 Jul 2007 00:56:21 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: Alan Stern <stern@...land.harvard.edu>,
linux-kernel@...r.kernel.org,
Nigel Cunningham <nigel@...el.suspend2.net>
Subject: Re: [RFC][PATCH -mm] Freezer: Handle uninterruptible tasks
On Friday, 6 July 2007 22:26, Oleg Nesterov wrote:
> Rafael J. Wysocki wrote:
> >
> > This patch makes the freezer skip uninterruptible user space tasks (ie. such
> > that have an mm of their own) when counting the tasks to be frozen. As a
> > result, these tasks have the TIF_FREEZE and TIF_SIGPENDING flags set, but the
> > freezer doesn't wait for them to enter the refrigerator. Nevertheless, they
> > will enter the refrigerator as soon as they change their state.
>
> A small correction: they will enter the refrigerator on return to user-space.
Yes, I should have written that explicitly.
> Actually, TASK_INTERRUPTIBLE doesn't mean the task actually sleeps. It could
> be running or preempted... I am a bit worried :)
Fortunately, similar approach has been tested quite extensively by suspend2,
IIRC. :-)
> > +static int freezer_should_skip(struct task_struct *p)
> > +{
> > + return (has_mm(p) && (p->state | TASK_UNINTERRUPTIBLE));
> ^^^
> I guess you meant "&", not "|".
Yes, I've already spotted that, but thanks anyway.
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
-
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