Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Gautham R Shenoy <ego@...>
Cc: <akpm@...>, <paulmck@...>, <torvalds@...>, <linux-kernel@...>, <vatsa@...>, Oleg Nesterov <oleg@...>, Rafael J. Wysocki <rjw@...>, <dipankar@...>, <dino@...>, <masami.hiramatsu.pt@...>
Date: Monday, April 2, 2007 - 7:27 am

* Gautham R Shenoy <ego@in.ibm.com> wrote:



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.

( the copy_process() handling is still needed, so that no new tasks
  without PF_FREEZE get created that could slip out of control. )

Such a wakeup will cause them to execute again but without disturbing 
their task->state value, at which point a second hook in schedule() 
could catch and freeze them. (and can restart the sleep afterwards, if 
the task is still TASK_UNINTERRUPTIBLE)

i.e. two easy hooks in schedule() plus a try_to_wake_up() variant that 
does not touch p->state. In fact the second hook could be used instead 
of the first one so one might be enough. (I can code up the scheduler 
bits for you if that would be helpful.)

	Ingo
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] Cpu-hotplug: Using the Process Freezer (try2), Gautham R Shenoy, (Mon Apr 2, 1:34 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Gautham R Shenoy, (Tue Apr 3, 8:01 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Rafael J. Wysocki, (Tue Apr 3, 3:34 pm)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Andrew Morton, (Tue Apr 3, 4:24 pm)
Re: utrace merge, Ingo Molnar, (Wed Apr 4, 6:06 am)
Re: utrace merge, Christoph Hellwig, (Wed Apr 4, 6:36 am)
Re: utrace merge, Andrew Morton, (Wed Apr 4, 2:41 pm)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Gautham R Shenoy, (Tue Apr 3, 10:01 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Gautham R Shenoy, (Mon Apr 2, 7:19 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Ingo Molnar, (Mon Apr 2, 7:27 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Rafael J. Wysocki, (Mon Apr 2, 6:12 pm)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Srivatsa Vaddagiri, (Mon Apr 2, 5:28 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Srivatsa Vaddagiri, (Mon Apr 2, 8:42 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Srivatsa Vaddagiri, (Tue Apr 3, 8:56 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Gautham R Shenoy, (Tue Apr 3, 10:15 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Srivatsa Vaddagiri, (Tue Apr 3, 11:15 pm)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Gautham R Shenoy, (Wed Apr 4, 6:41 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Gautham R Shenoy, (Wed Apr 4, 8:24 am)
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2), Gautham R Shenoy, (Mon Apr 2, 10:16 am)
[PATCH 8/8] Make kernel threads freezeable for cpu-hotplug, Gautham R Shenoy, (Mon Apr 2, 1:42 am)
Re: [PATCH 7/8] Clean up workqueue.c with respect to the fre..., Srivatsa Vaddagiri, (Tue Apr 3, 9:59 am)
Re: [PATCH 7/8] Clean up workqueue.c with respect to the fre..., Srivatsa Vaddagiri, (Tue Apr 3, 1:18 pm)
Re: [PATCH 7/8] Clean up workqueue.c with respect to the fre..., Srivatsa Vaddagiri, (Wed Apr 11, 10:22 pm)
Re: [PATCH 7/8] Clean up workqueue.c with respect to the fre..., Srivatsa Vaddagiri, (Wed Apr 4, 1:49 pm)
[PATCH 5/8] __cpu_up: use singlethreaded workqueue, Gautham R Shenoy, (Mon Apr 2, 1:40 am)
Re: [PATCH 5/8] __cpu_up: use singlethreaded workqueue, Oleg Nesterov, (Thu Apr 5, 8:08 am)
[PATCH 4/8] Rip out lock_cpu_hotplug(), Gautham R Shenoy, (Mon Apr 2, 1:39 am)
[PATCH 3/8] Use process freezer for cpu-hotplug, Gautham R Shenoy, (Mon Apr 2, 1:38 am)
Re: [PATCH 3/8] Use process freezer for cpu-hotplug, Nathan Lynch, (Fri Apr 6, 1:27 pm)
Re: [PATCH 3/8] Use process freezer for cpu-hotplug, Ingo Molnar, (Fri Apr 6, 1:34 pm)
Re: [PATCH 3/8] Use process freezer for cpu-hotplug, Pavel Machek, (Sat Apr 14, 2:48 pm)
Re: [PATCH 3/8] Use process freezer for cpu-hotplug, Nathan Lynch, (Fri Apr 6, 1:47 pm)
Re: [PATCH 3/8] Use process freezer for cpu-hotplug, Nigel Cunningham, (Fri Apr 6, 6:22 pm)
Re: [PATCH 3/8] Use process freezer for cpu-hotplug, Oleg Nesterov, (Thu Apr 5, 6:53 am)
Re: [PATCH 3/8] Use process freezer for cpu-hotplug, Gautham R Shenoy, (Thu Apr 5, 8:14 am)
Re: [PATCH 3/8] Use process freezer for cpu-hotplug, Oleg Nesterov, (Thu Apr 5, 9:34 am)
[PATCH 2/8] Make process freezer reentrant, Gautham R Shenoy, (Mon Apr 2, 1:37 am)
Re: [PATCH 2/8] Make process freezer reentrant, Oleg Nesterov, (Thu Apr 5, 5:53 am)
Re: [PATCH 2/8] Make process freezer reentrant, Gautham R Shenoy, (Thu Apr 5, 6:19 am)
Re: [PATCH 1/8] Enhance process freezer interface for usage ..., Rafael J. Wysocki, (Fri Apr 6, 10:34 am)