Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Rafael J. Wysocki
On Monday, 23 April 2007 23:16, Gautham R Shenoy wrote: > On Tue, Apr 24, 2007 at 12:46:37AM +0400, Oleg Nesterov wrote: > > On 04/23, Rafael J. Wysocki wrote: > > > > > > On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: > > > > > + if (!freezer_should_exempt(current)) { > > > >

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Gautham R Shenoy
On Tue, Apr 24, 2007 at 12:46:37AM +0400, Oleg Nesterov wrote: > On 04/23, Rafael J. Wysocki wrote: > > > > On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: > > > > + if (!freezer_should_exempt(current)) { > > > task_lock(k); > > > > + /* We are freezable, so

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Oleg Nesterov
On 04/23, Rafael J. Wysocki wrote: > > On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: > > > + if (!freezer_should_exempt(current)) { > > task_lock(k); > > > + /* We are freezable, so we must make sure that the thread being > > > + * stopped is not frozen and

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Rafael J. Wysocki
On Monday, 23 April 2007 21:03, Oleg Nesterov wrote: > On 04/23, Gautham R Shenoy wrote: > > > > On Sun, Apr 22, 2007 at 09:40:59PM +0200, Rafael J. Wysocki wrote: > > > /* > > > @@ -232,6 +233,14 @@ int kthread_stop(struct task_struct *k) > > > > > > /* Now set kthread_should_stop() to true,

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Rafael J. Wysocki
Hi, On Monday, 23 April 2007 12:40, Pavel Machek wrote: > Hi! > > > Fix the problem with kthread_stop() that causes the freezer to fail if a > > freezable thread is attempting to stop a frozen one and that may cause the > > freezer to fail if the thread being stopped is freezable and > >

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Rafael J. Wysocki
On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: > On Sun, Apr 22, 2007 at 09:40:59PM +0200, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki <[EMAIL PROTECTED]> > > > > Fix the problem with kthread_stop() that causes the freezer to fail if a > > freezable thread is attempting to stop

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Oleg Nesterov
On 04/23, Gautham R Shenoy wrote: > > On Sun, Apr 22, 2007 at 09:40:59PM +0200, Rafael J. Wysocki wrote: > > /* > > @@ -232,6 +233,14 @@ int kthread_stop(struct task_struct *k) > > > > /* Now set kthread_should_stop() to true, and wake it up. */ > > kthread_stop_info.k = k; > > + if

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Gautham R Shenoy
On Sun, Apr 22, 2007 at 09:40:59PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <[EMAIL PROTECTED]> > > Fix the problem with kthread_stop() that causes the freezer to fail if a > freezable thread is attempting to stop a frozen one and that may cause the > freezer to fail if the

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Pavel Machek
Hi! > Fix the problem with kthread_stop() that causes the freezer to fail if a > freezable thread is attempting to stop a frozen one and that may cause the > freezer to fail if the thread being stopped is freezable and > try_to_freeze_tasks() is running concurrently with kthread_stop(). Parse

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Pavel Machek
Hi! Fix the problem with kthread_stop() that causes the freezer to fail if a freezable thread is attempting to stop a frozen one and that may cause the freezer to fail if the thread being stopped is freezable and try_to_freeze_tasks() is running concurrently with kthread_stop(). Parse error.

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Gautham R Shenoy
On Sun, Apr 22, 2007 at 09:40:59PM +0200, Rafael J. Wysocki wrote: From: Rafael J. Wysocki [EMAIL PROTECTED] Fix the problem with kthread_stop() that causes the freezer to fail if a freezable thread is attempting to stop a frozen one and that may cause the freezer to fail if the thread being

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Oleg Nesterov
On 04/23, Gautham R Shenoy wrote: On Sun, Apr 22, 2007 at 09:40:59PM +0200, Rafael J. Wysocki wrote: /* @@ -232,6 +233,14 @@ int kthread_stop(struct task_struct *k) /* Now set kthread_should_stop() to true, and wake it up. */ kthread_stop_info.k = k; + if

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Rafael J. Wysocki
Hi, On Monday, 23 April 2007 12:40, Pavel Machek wrote: Hi! Fix the problem with kthread_stop() that causes the freezer to fail if a freezable thread is attempting to stop a frozen one and that may cause the freezer to fail if the thread being stopped is freezable and

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Rafael J. Wysocki
On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: On Sun, Apr 22, 2007 at 09:40:59PM +0200, Rafael J. Wysocki wrote: From: Rafael J. Wysocki [EMAIL PROTECTED] Fix the problem with kthread_stop() that causes the freezer to fail if a freezable thread is attempting to stop a frozen

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Rafael J. Wysocki
On Monday, 23 April 2007 21:03, Oleg Nesterov wrote: On 04/23, Gautham R Shenoy wrote: On Sun, Apr 22, 2007 at 09:40:59PM +0200, Rafael J. Wysocki wrote: /* @@ -232,6 +233,14 @@ int kthread_stop(struct task_struct *k) /* Now set kthread_should_stop() to true, and wake it up.

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Oleg Nesterov
On 04/23, Rafael J. Wysocki wrote: On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: + if (!freezer_should_exempt(current)) { task_lock(k); + /* We are freezable, so we must make sure that the thread being + * stopped is not frozen and will not be

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Gautham R Shenoy
On Tue, Apr 24, 2007 at 12:46:37AM +0400, Oleg Nesterov wrote: On 04/23, Rafael J. Wysocki wrote: On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: + if (!freezer_should_exempt(current)) { task_lock(k); + /* We are freezable, so we must make sure

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Rafael J. Wysocki
On Monday, 23 April 2007 23:16, Gautham R Shenoy wrote: On Tue, Apr 24, 2007 at 12:46:37AM +0400, Oleg Nesterov wrote: On 04/23, Rafael J. Wysocki wrote: On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: + if (!freezer_should_exempt(current)) {

[RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-22 Thread Rafael J. Wysocki
From: Rafael J. Wysocki <[EMAIL PROTECTED]> Fix the problem with kthread_stop() that causes the freezer to fail if a freezable thread is attempting to stop a frozen one and that may cause the freezer to fail if the thread being stopped is freezable and try_to_freeze_tasks() is running

[RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-22 Thread Rafael J. Wysocki
From: Rafael J. Wysocki [EMAIL PROTECTED] Fix the problem with kthread_stop() that causes the freezer to fail if a freezable thread is attempting to stop a frozen one and that may cause the freezer to fail if the thread being stopped is freezable and try_to_freeze_tasks() is running concurrently