All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix 2.6.32.23 suspend regression caused by commit 6f6198a
@ 2010-10-01  4:27 Mike Galbraith
  2010-10-01  5:04 ` Mike Galbraith
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Galbraith @ 2010-10-01  4:27 UTC (permalink / raw)
  To: stable; +Cc: Greg KH, LKML

Greetings -stable/Greg,

Thoroughly tested scheduler fixes series was not so thoroughly tested
with suspend.. like at all (my nvidia card doesn't do the resume part).

Sorry about that.

	-Mike

From: Mike Galbraith <efault@gmx.de>
Date: Fri, 1 Oct 2010 05:57:59 +0200
Subject: [PATCH] fix 2.6.32.23 suspend regression caused by commit 6f6198a

6f6198a sched: kill migration thread in CPU_POST_DEAD instead of CPU_DEAD
leaves migration threads lying about.  Mask out CPU_TASKS_FROZEN.

Signed-off-by: Mike Galbraith <efault@gmx.de>
---
 kernel/sched.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 3480822..a675fd6 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7752,10 +7752,9 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
 	unsigned long flags;
 	struct rq *rq;
 
-	switch (action) {
+	switch (action & ~CPU_TASKS_FROZEN) {
 
 	case CPU_UP_PREPARE:
-	case CPU_UP_PREPARE_FROZEN:
 		p = kthread_create(migration_thread, hcpu, "migration/%d", cpu);
 		if (IS_ERR(p))
 			return NOTIFY_BAD;
@@ -7770,7 +7769,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
 		break;
 
 	case CPU_ONLINE:
-	case CPU_ONLINE_FROZEN:
 		/* Strictly unnecessary, as first user will wake it. */
 		wake_up_process(cpu_rq(cpu)->migration_thread);
 
@@ -7787,7 +7785,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
 
 #ifdef CONFIG_HOTPLUG_CPU
 	case CPU_UP_CANCELED:
-	case CPU_UP_CANCELED_FROZEN:
 		if (!cpu_rq(cpu)->migration_thread)
 			break;
 		/* Unbind it from offline cpu so it can run. Fall thru. */
@@ -7812,7 +7809,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
 		break;
 
 	case CPU_DEAD:
-	case CPU_DEAD_FROZEN:
 		migrate_live_tasks(cpu);
 		rq = cpu_rq(cpu);
 		/* Idle task back to normal (off runqueue, low prio) */
@@ -7846,7 +7842,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
 		break;
 
 	case CPU_DYING:
-	case CPU_DYING_FROZEN:
 		/* Update our root-domain */
 		rq = cpu_rq(cpu);
 		spin_lock_irqsave(&rq->lock, flags);
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] fix 2.6.32.23 suspend regression caused by commit 6f6198a
  2010-10-01  4:27 [PATCH] fix 2.6.32.23 suspend regression caused by commit 6f6198a Mike Galbraith
@ 2010-10-01  5:04 ` Mike Galbraith
  2010-10-01 19:16   ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Galbraith @ 2010-10-01  5:04 UTC (permalink / raw)
  To: stable; +Cc: Greg KH, LKML

Again, with a less bouncy address.

From: Mike Galbraith <efault@gmx.de>
Date: Fri, 1 Oct 2010 05:57:59 +0200
Subject: [PATCH] fix 2.6.32.23 suspend regression caused by commit
6f6198a

6f6198a sched: kill migration thread in CPU_POST_DEAD instead of
CPU_DEAD
leaves migration threads lying about.  Mask out CPU_TASKS_FROZEN.

Signed-off-by: Mike Galbraith <efault@gmx.de>
---
 kernel/sched.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 3480822..a675fd6 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7752,10 +7752,9 @@ migration_call(struct notifier_block *nfb,
unsigned long action, void *hcpu)
        unsigned long flags;
        struct rq *rq;
 
-       switch (action) {
+       switch (action & ~CPU_TASKS_FROZEN) {
 
        case CPU_UP_PREPARE:
-       case CPU_UP_PREPARE_FROZEN:
                p = kthread_create(migration_thread, hcpu, "migration/%
d", cpu);
                if (IS_ERR(p))
                        return NOTIFY_BAD;
@@ -7770,7 +7769,6 @@ migration_call(struct notifier_block *nfb,
unsigned long action, void *hcpu)
                break;
 
        case CPU_ONLINE:
-       case CPU_ONLINE_FROZEN:
                /* Strictly unnecessary, as first user will wake it. */
                wake_up_process(cpu_rq(cpu)->migration_thread);
 
@@ -7787,7 +7785,6 @@ migration_call(struct notifier_block *nfb,
unsigned long action, void *hcpu)
 
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_UP_CANCELED:
-       case CPU_UP_CANCELED_FROZEN:
                if (!cpu_rq(cpu)->migration_thread)
                        break;
                /* Unbind it from offline cpu so it can run. Fall thru.
*/
@@ -7812,7 +7809,6 @@ migration_call(struct notifier_block *nfb,
unsigned long action, void *hcpu)
                break;
 
        case CPU_DEAD:
-       case CPU_DEAD_FROZEN:
                migrate_live_tasks(cpu);
                rq = cpu_rq(cpu);
                /* Idle task back to normal (off runqueue, low prio) */
@@ -7846,7 +7842,6 @@ migration_call(struct notifier_block *nfb,
unsigned long action, void *hcpu)
                break;
 
        case CPU_DYING:
-       case CPU_DYING_FROZEN:
                /* Update our root-domain */
                rq = cpu_rq(cpu);
                spin_lock_irqsave(&rq->lock, flags);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] fix 2.6.32.23 suspend regression caused by commit 6f6198a
  2010-10-01  5:04 ` Mike Galbraith
@ 2010-10-01 19:16   ` Greg KH
  2010-10-01 19:44     ` Mike Galbraith
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2010-10-01 19:16 UTC (permalink / raw)
  To: Mike Galbraith; +Cc: stable, LKML

On Fri, Oct 01, 2010 at 07:04:11AM +0200, Mike Galbraith wrote:
> Again, with a less bouncy address.
> 
> From: Mike Galbraith <efault@gmx.de>
> Date: Fri, 1 Oct 2010 05:57:59 +0200
> Subject: [PATCH] fix 2.6.32.23 suspend regression caused by commit
> 6f6198a
> 
> 6f6198a sched: kill migration thread in CPU_POST_DEAD instead of
> CPU_DEAD
> leaves migration threads lying about.  Mask out CPU_TASKS_FROZEN.
> 
> Signed-off-by: Mike Galbraith <efault@gmx.de>

Is this patch upstream already?  If so, what's the git commit id of it?
If not, why isn't it also needed there?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] fix 2.6.32.23 suspend regression caused by commit 6f6198a
  2010-10-01 19:16   ` Greg KH
@ 2010-10-01 19:44     ` Mike Galbraith
  2010-10-01 21:00       ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Galbraith @ 2010-10-01 19:44 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, LKML

On Fri, 2010-10-01 at 12:16 -0700, Greg KH wrote:
> On Fri, Oct 01, 2010 at 07:04:11AM +0200, Mike Galbraith wrote:
> > Again, with a less bouncy address.
> > 
> > From: Mike Galbraith <efault@gmx.de>
> > Date: Fri, 1 Oct 2010 05:57:59 +0200
> > Subject: [PATCH] fix 2.6.32.23 suspend regression caused by commit
> > 6f6198a
> > 
> > 6f6198a sched: kill migration thread in CPU_POST_DEAD instead of
> > CPU_DEAD
> > leaves migration threads lying about.  Mask out CPU_TASKS_FROZEN.
> > 
> > Signed-off-by: Mike Galbraith <efault@gmx.de>
> 
> Is this patch upstream already?  If so, what's the git commit id of it?
> If not, why isn't it also needed there?

No, it's not upstream, and will never go upstream because they don't
need it.  It's only needed for -stable because the fix incorporated in
-stable is incomplete.  Upstream already does what this patch adds.

	-Mike


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] fix 2.6.32.23 suspend regression caused by commit 6f6198a
  2010-10-01 19:44     ` Mike Galbraith
@ 2010-10-01 21:00       ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2010-10-01 21:00 UTC (permalink / raw)
  To: Mike Galbraith; +Cc: stable, LKML

On Fri, Oct 01, 2010 at 09:44:11PM +0200, Mike Galbraith wrote:
> On Fri, 2010-10-01 at 12:16 -0700, Greg KH wrote:
> > On Fri, Oct 01, 2010 at 07:04:11AM +0200, Mike Galbraith wrote:
> > > Again, with a less bouncy address.
> > > 
> > > From: Mike Galbraith <efault@gmx.de>
> > > Date: Fri, 1 Oct 2010 05:57:59 +0200
> > > Subject: [PATCH] fix 2.6.32.23 suspend regression caused by commit
> > > 6f6198a
> > > 
> > > 6f6198a sched: kill migration thread in CPU_POST_DEAD instead of
> > > CPU_DEAD
> > > leaves migration threads lying about.  Mask out CPU_TASKS_FROZEN.
> > > 
> > > Signed-off-by: Mike Galbraith <efault@gmx.de>
> > 
> > Is this patch upstream already?  If so, what's the git commit id of it?
> > If not, why isn't it also needed there?
> 
> No, it's not upstream, and will never go upstream because they don't
> need it.  It's only needed for -stable because the fix incorporated in
> -stable is incomplete.  Upstream already does what this patch adds.

Ah, ok, that makes sense, thanks.  I'll queue it up.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-01 21:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01  4:27 [PATCH] fix 2.6.32.23 suspend regression caused by commit 6f6198a Mike Galbraith
2010-10-01  5:04 ` Mike Galbraith
2010-10-01 19:16   ` Greg KH
2010-10-01 19:44     ` Mike Galbraith
2010-10-01 21:00       ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.