Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-21 Thread Pavel Machek
Hi! > Rafael, > On Sat, Feb 17, 2007 at 12:24:45PM +0100, Rafael J. Wysocki wrote: > > > > Pavel, do you think we can remove the PF_NOFREEZE from bluetooth, BTW? > > The create_workqueue by default marks the worker_threads to be > non_freezable. For cpu hotplug, all workqueues can be frozen > e

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-21 Thread Gautham R Shenoy
Rafael, On Sat, Feb 17, 2007 at 12:24:45PM +0100, Rafael J. Wysocki wrote: > > Pavel, do you think we can remove the PF_NOFREEZE from bluetooth, BTW? The create_workqueue by default marks the worker_threads to be non_freezable. For cpu hotplug, all workqueues can be frozen except the "kthread" w

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Rafael J. Wysocki
On Sunday, 18 February 2007 17:11, Oleg Nesterov wrote: > On 02/18, Rafael J. Wysocki wrote: > > > > > On Sunday, 18 February 2007 12:31, Oleg Nesterov wrote: > > > > > > > > A very vague idea: what if parent will do > > > > > > > > current->flags |= > > > > PF_PLEASE_CONSIDER_ME_AS_FROZ

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Oleg Nesterov
On 02/18, Rafael J. Wysocki wrote: > > > On Sunday, 18 February 2007 12:31, Oleg Nesterov wrote: > > > > > > A very vague idea: what if parent will do > > > > > > current->flags |= PF_PLEASE_CONSIDER_ME_AS_FROZEN_BUT_SET_TIF_FREEZE > > > wait_for_completion(&vfork); > > > try_to_freeze(); >

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Rafael J. Wysocki
On Sunday, 18 February 2007 13:14, Rafael J. Wysocki wrote: > On Sunday, 18 February 2007 12:31, Oleg Nesterov wrote: > > On 02/18, Rafael J. Wysocki wrote: > > > > > > On Sunday, 18 February 2007 00:47, Oleg Nesterov wrote: > > > > > > > > However, this means that sys_vfork() makes impossible to

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Oleg Nesterov
On 02/18, Rafael J. Wysocki wrote: > > On Sunday, 18 February 2007 12:32, Oleg Nesterov wrote: > > On 02/18, Rafael J. Wysocki wrote: > > > > > > On Sunday, 18 February 2007 00:42, Oleg Nesterov wrote: > > > > On 02/17, Rafael J. Wysocki wrote: > > > > > > > > > > On Saturday, 17 February 2007 22:3

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Pavel Machek
Hi! > > > So I think tonight I'll start adding try_to_freeze() to the kernel > > > threads that > > > set PF_NOFREEZE. > > > > cool! While you are at it, let me try to enhance the freezer api's > > to incorporate the PFE_* flags. > > Here's a patch that adds try_to_freeze() to all kernel thread

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Rafael J. Wysocki
On Sunday, 18 February 2007 12:32, Oleg Nesterov wrote: > On 02/18, Rafael J. Wysocki wrote: > > > > On Sunday, 18 February 2007 00:42, Oleg Nesterov wrote: > > > On 02/17, Rafael J. Wysocki wrote: > > > > > > > > On Saturday, 17 February 2007 22:34, Oleg Nesterov wrote: > > > > > > > > > >

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Rafael J. Wysocki
On Sunday, 18 February 2007 12:31, Oleg Nesterov wrote: > On 02/18, Rafael J. Wysocki wrote: > > > > On Sunday, 18 February 2007 00:47, Oleg Nesterov wrote: > > > > > > However, this means that sys_vfork() makes impossible to freeze processes > > > until child exits/execs. Not good. > > > > Yes,

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Oleg Nesterov
On 02/18, Rafael J. Wysocki wrote: > > On Sunday, 18 February 2007 00:42, Oleg Nesterov wrote: > > On 02/17, Rafael J. Wysocki wrote: > > > > > > On Saturday, 17 February 2007 22:34, Oleg Nesterov wrote: > > > > > > > > static inline int is_user_space(struct task_struct *p) > > > >

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Oleg Nesterov
On 02/18, Rafael J. Wysocki wrote: > > On Sunday, 18 February 2007 00:47, Oleg Nesterov wrote: > > > > However, this means that sys_vfork() makes impossible to freeze processes > > until child exits/execs. Not good. > > Yes, but this also is the current behavior. Yes, yes, I see. I forgot to sa

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Rafael J. Wysocki
On Sunday, 18 February 2007 00:42, Oleg Nesterov wrote: > On 02/17, Rafael J. Wysocki wrote: > > > > On Saturday, 17 February 2007 22:34, Oleg Nesterov wrote: > > > > > > static inline int is_user_space(struct task_struct *p) > > > { > > > return p->mm && !(p->flags & PF_BORROWED_MM)

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-18 Thread Rafael J. Wysocki
On Sunday, 18 February 2007 00:47, Oleg Nesterov wrote: > On 02/18, Oleg Nesterov wrote: > > > > On 02/17, Rafael J. Wysocki wrote: > > > > > > Alternatively, we can move the check into refrigerator(), like this: > > > > > > --- linux-2.6.20-git13.orig/kernel/power/process.c > > > +++ linux-2.6.20

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-17 Thread Oleg Nesterov
On 02/18, Oleg Nesterov wrote: > > On 02/17, Rafael J. Wysocki wrote: > > > > Alternatively, we can move the check into refrigerator(), like this: > > > > --- linux-2.6.20-git13.orig/kernel/power/process.c > > +++ linux-2.6.20-git13/kernel/power/process.c > > @@ -39,6 +39,11 @@ void refrigerator(v

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-17 Thread Oleg Nesterov
On 02/17, Rafael J. Wysocki wrote: > > On Saturday, 17 February 2007 22:34, Oleg Nesterov wrote: > > > > static inline int is_user_space(struct task_struct *p) > > { > > return p->mm && !(p->flags & PF_BORROWED_MM); > > } > > > > This doesn't look right. First, an exiting

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-17 Thread Rafael J. Wysocki
On Saturday, 17 February 2007 22:34, Oleg Nesterov wrote: > Rafael, I am trying to understand try_to_freeze_tasks(), and I have a > couple of questions. > > static inline int is_user_space(struct task_struct *p) > { > return p->mm && !(p->flags & PF_BORROWED_MM); >

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-17 Thread Oleg Nesterov
Rafael, I am trying to understand try_to_freeze_tasks(), and I have a couple of questions. static inline int is_user_space(struct task_struct *p) { return p->mm && !(p->flags & PF_BORROWED_MM); } This doesn't look right. First, an exiting task has ->mm == N

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-17 Thread Rafael J. Wysocki
On Thursday, 15 February 2007 15:25, Gautham R Shenoy wrote: > On Thu, Feb 15, 2007 at 02:31:08PM +0100, Rafael J. Wysocki wrote: > > > > So I think tonight I'll start adding try_to_freeze() to the kernel threads > > that > > set PF_NOFREEZE. > > cool! While you are at it, let me try to enhance

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-15 Thread Gautham R Shenoy
On Thu, Feb 15, 2007 at 02:31:08PM +0100, Rafael J. Wysocki wrote: > > So I think tonight I'll start adding try_to_freeze() to the kernel threads > that > set PF_NOFREEZE. cool! While you are at it, let me try to enhance the freezer api's to incorporate the PFE_* flags. > > > > That would stil

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-15 Thread Rafael J. Wysocki
On Thursday, 15 February 2007 13:20, Gautham R Shenoy wrote: > On Thu, Feb 15, 2007 at 09:09:51AM +0100, Rafael J. Wysocki wrote: > > > > > > Why should we make sure that PF_NOFREEZE tasks are also frozen for > > > cpu hotplug? Instead, we can create an infrastructure which allows > > > threads t

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-15 Thread Gautham R Shenoy
On Thu, Feb 15, 2007 at 09:09:51AM +0100, Rafael J. Wysocki wrote: > > > > Why should we make sure that PF_NOFREEZE tasks are also frozen for > > cpu hotplug? Instead, we can create an infrastructure which allows threads > > to > > specify for the scenarios they would want to be excempted from fr

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-15 Thread Rafael J. Wysocki
On Thursday, 15 February 2007 07:34, Gautham R Shenoy wrote: > On Wed, Feb 14, 2007 at 10:43:35PM +0100, Rafael J. Wysocki wrote: > > Hi, > > > > On Wednesday, 14 February 2007 15:40, Gautham R Shenoy wrote: > > > Hello Everybody, > > > > > > This is an experiment towards process_freezer based im

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-14 Thread Gautham R Shenoy
On Wed, Feb 14, 2007 at 10:43:35PM +0100, Rafael J. Wysocki wrote: > Hi, > > On Wednesday, 14 February 2007 15:40, Gautham R Shenoy wrote: > > Hello Everybody, > > > > This is an experiment towards process_freezer based implementation > > of cpu-hotplug. This is mainly based on ideas of Andrew Mo

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-14 Thread Rafael J. Wysocki
Hi, On Wednesday, 14 February 2007 15:40, Gautham R Shenoy wrote: > Hello Everybody, > > This is an experiment towards process_freezer based implementation > of cpu-hotplug. This is mainly based on ideas of Andrew Morton, > Ingo Molnar and Paul Mckenney featured in the discussion > http://lkml.o