Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-15 Thread Pavel Machek
Hi! > > > - raw_notifier_call_chain(&cpu_chain, CPU_LOCK_ACQUIRE, hcpu); > > > + if (freeze_processes(FE_HOTPLUG_CPU)) { > > > + thaw_processes(FE_HOTPLUG_CPU); > > > + return -EBUSY; > > > + } > > > + > > > > If I'm understanding correctly, this will cause > > > > # echo 0 > /sys

Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-06 Thread Nigel Cunningham
Hi. On Fri, 2007-04-06 at 12:47 -0500, Nathan Lynch wrote: > Ingo Molnar wrote: > > > > * Nathan Lynch <[EMAIL PROTECTED]> wrote: > > > > > > - raw_notifier_call_chain(&cpu_chain, CPU_LOCK_ACQUIRE, hcpu); > > > > + if (freeze_processes(FE_HOTPLUG_CPU)) { > > > > + thaw_

Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-06 Thread Nathan Lynch
Ingo Molnar wrote: > > * Nathan Lynch <[EMAIL PROTECTED]> wrote: > > > > - raw_notifier_call_chain(&cpu_chain, CPU_LOCK_ACQUIRE, hcpu); > > > + if (freeze_processes(FE_HOTPLUG_CPU)) { > > > + thaw_processes(FE_HOTPLUG_CPU); > > > + return -EBUSY; > > > + } > > > + > > > > If I'm

Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-06 Thread Ingo Molnar
* Nathan Lynch <[EMAIL PROTECTED]> wrote: > > - raw_notifier_call_chain(&cpu_chain, CPU_LOCK_ACQUIRE, hcpu); > > + if (freeze_processes(FE_HOTPLUG_CPU)) { > > + thaw_processes(FE_HOTPLUG_CPU); > > + return -EBUSY; > > + } > > + > > If I'm understanding correctly, this w

Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-06 Thread Nathan Lynch
Gautham R Shenoy wrote: > This patch implements process_freezer based cpu-hotplug > core. > The sailent features are: > o No more (un)lock_cpu_hotplug. > o No more CPU_LOCK_ACQUIRE and CPU_LOCK_RELEASE. Hence no per-subsystem > hotcpu mutexes. > o Calls freeze_process/thaw_processes at the begin

Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-05 Thread Oleg Nesterov
On 04/05, Gautham R Shenoy wrote: > > > > @@ -147,6 +147,7 @@ cpu_callback(struct notifier_block *nfb, > > > case CPU_DEAD: > > > p = per_cpu(watchdog_task, hotcpu); > > > per_cpu(watchdog_task, hotcpu) = NULL; > > > + thaw_process(p); > > > kthread_stop(p);

Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-05 Thread Gautham R Shenoy
On Thu, Apr 05, 2007 at 02:53:56PM +0400, Oleg Nesterov wrote: > On 04/02, Gautham R Shenoy wrote: > > > > + if (freeze_processes(FE_HOTPLUG_CPU)) { > > + thaw_processes(FE_HOTPLUG_CPU); > > + return -EBUSY; > > + } > > Off-topic. This is a common pattern. Perhaps it makes

Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-05 Thread Oleg Nesterov
On 04/02, Gautham R Shenoy wrote: > > + if (freeze_processes(FE_HOTPLUG_CPU)) { > + thaw_processes(FE_HOTPLUG_CPU); > + return -EBUSY; > + } Off-topic. This is a common pattern. Perhaps it makes sense to introduce a try_to_freeze_or_thaw_and_return_an_error() helper

[PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-01 Thread Gautham R Shenoy
This patch implements process_freezer based cpu-hotplug core. The sailent features are: o No more (un)lock_cpu_hotplug. o No more CPU_LOCK_ACQUIRE and CPU_LOCK_RELEASE. Hence no per-subsystem hotcpu mutexes. o Calls freeze_process/thaw_processes at the beginning/end of the hotplug operation.