[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200704030012.32113.rjw@sisk.pl>
Date: Tue, 3 Apr 2007 00:12:30 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Ingo Molnar <mingo@...e.hu>
Cc: Gautham R Shenoy <ego@...ibm.com>, akpm@...ux-foundation.org,
paulmck@...ibm.com, torvalds@...ux-foundation.org,
linux-kernel@...r.kernel.org, vatsa@...ibm.com,
Oleg Nesterov <oleg@...sign.ru>, dipankar@...ibm.com,
dino@...ibm.com, masami.hiramatsu.pt@...achi.com,
Pavel Machek <pavel@....cz>
Subject: Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)
On Monday, 2 April 2007 13:27, Ingo Molnar wrote:
>
> * Gautham R Shenoy <ego@...ibm.com> wrote:
>
> > From what I can make out, we fail to freeze if we have some task in
> > the TASK_UNINTERRUPTIBLE state for more than the timeout period.
>
> > Question is can we have some task in TASK_UNINTERRUPTIBLE state for
> > such a long duration (20sec) ??
>
> yes, easily so - just have a really long disk queue. Or really heavy
> mutex contention.
>
> i really think we should add a freezing hook to schedule too (no need to
> change anything else - just add a PF_FREEZE check into the schedule()
> function) - and add a wakeup method that moves TASK_UNINTERRUPTIBLE
> tasks to the runqueue but does not touch their task->state.
Yes, something like this would be necessary to handle TASK_UNINTERRUPTIBLE
tasks. _Still_, currently we just fail the freezing if there are
uninterruptible tasks, because they can hold locks and may potentially
deadlock with device drivers' .suspend() or .resume() routines (please remember
that the freezer is used for suspending in the first place :-)).
I think we can freeze uninterruptible tasks for the CPU hotplug, but we should
avoid freezing them for the suspend.
> ( the copy_process() handling is still needed, so that no new tasks
> without PF_FREEZE get created that could slip out of control. )
We can catch them while we're freezing kernel threads (provided that the kernel
threads themselves aren't forking like mad, but this doesn't seem to happen in
practice).
Greetings,
Rafael
-
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