All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
	linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Carsten Emde <C.Emde@osadl.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	John Kacur <jkacur@redhat.com>,
	Tiejun Chen <tiejun.chen@windriver.com>
Subject: [PATCH RT 1/5] cpu_down: move migrate_enable() back
Date: Tue, 10 Dec 2013 19:37:33 -0500	[thread overview]
Message-ID: <20131211003801.695104401@goodmis.org> (raw)
In-Reply-To: 20131211003732.351606520@goodmis.org

[-- Attachment #1: 0001-cpu_down-move-migrate_enable-back.patch --]
[-- Type: text/plain, Size: 1632 bytes --]

3.10.22-rt20-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Tiejun Chen <tiejun.chen@windriver.com>

Commit 08c1ab68, "hotplug-use-migrate-disable.patch", intends to
use migrate_enable()/migrate_disable() to replace that combination
of preempt_enable() and preempt_disable(), but actually in
!CONFIG_PREEMPT_RT_FULL case, migrate_enable()/migrate_disable()
are still equal to preempt_enable()/preempt_disable(). So that
followed cpu_hotplug_begin()/cpu_unplug_begin(cpu) would go schedule()
to trigger schedule_debug() like this:

_cpu_down()
	|
	+ migrate_disable() = preempt_disable()
	|
	+ cpu_hotplug_begin() or cpu_unplug_begin()
		|
		+ schedule()
			|
			+ __schedule()
				|
				+ preempt_disable();
				|
				+ __schedule_bug() is true!

So we should move migrate_enable() as the original scheme.

Cc: stable-rt@vger.kernel.org
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 716c98b..c62ae01 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -596,6 +596,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
 		err = -EBUSY;
 		goto restore_cpus;
 	}
+	migrate_enable();
 
 	cpu_hotplug_begin();
 	err = cpu_unplug_begin(cpu);
@@ -649,7 +650,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
 out_release:
 	cpu_unplug_done(cpu);
 out_cancel:
-	migrate_enable();
 	cpu_hotplug_done();
 	if (!err)
 		cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu);
-- 
1.8.4.3

  reply	other threads:[~2013-12-11  0:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11  0:37 [PATCH RT 0/5] Linux 3.10.22-rt20-rc1 Steven Rostedt
2013-12-11  0:37 ` Steven Rostedt [this message]
2013-12-11  0:37 ` [PATCH RT 2/5] a few open coded completions Steven Rostedt
2013-12-11 14:25   ` Corey Minyard
2013-12-11 15:34     ` Steven Rostedt
2013-12-15 15:28       ` Sebastian Andrzej Siewior
2013-12-15 21:08         ` Steven Rostedt
2013-12-11 19:49   ` Steven Rostedt
2014-03-09  0:27     ` Ben Hutchings
2014-03-10 14:29       ` Steven Rostedt
2014-03-10 17:52         ` Ben Hutchings
2014-03-10 18:14           ` Steven Rostedt
2014-03-11  2:06             ` Ben Hutchings
2014-03-11  2:56               ` Steven Rostedt
2014-03-11 15:54                 ` Steven Rostedt
2014-03-12 18:15                   ` Ben Hutchings
2013-12-11  0:37 ` [PATCH RT 3/5] lockdep: Correctly annotate hardirq context in irq_exit() Steven Rostedt
2013-12-11  0:37 ` [PATCH RT 4/5] rtmutex: use a trylock for waiter lock in trylock Steven Rostedt
2013-12-11  0:37 ` [PATCH RT 5/5] Linux 3.10.22-rt20-rc1 Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2013-12-11  0:46 [PATCH RT 0/5] Linux 3.8.13.13-rt26-rc1 Steven Rostedt
2013-12-11  0:46 ` [PATCH RT 1/5] cpu_down: move migrate_enable() back Steven Rostedt
2013-12-11  0:50 [PATCH RT 0/5] Linux 3.4.72-rt90-rc1 Steven Rostedt
2013-12-11  0:50 ` [PATCH RT 1/5] cpu_down: move migrate_enable() back Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131211003801.695104401@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=C.Emde@osadl.org \
    --cc=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tiejun.chen@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.