[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200117174131.757396978@goodmis.org>
Date: Fri, 17 Jan 2020 12:41:40 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org,
linux-rt-users <linux-rt-users@...r.kernel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Carsten Emde <C.Emde@...dl.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
John Kacur <jkacur@...hat.com>,
Julia Cartwright <julia@...com>,
Daniel Wagner <wagi@...om.org>,
Tom Zanussi <zanussi@...nel.org>,
Dick Hollenbeck <dick@...tplc.com>
Subject: [PATCH RT 29/32] sched/core: migrate_enable() must access takedown_cpu_task on
!HOTPLUG_CPU
4.19.94-rt39-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
[ Upstream commit a61d1977f692e46bad99a100f264981ba08cb4bd ]
The variable takedown_cpu_task is never declared/used on !HOTPLUG_CPU
except for migrate_enable(). This leads to a link error.
Don't use takedown_cpu_task in !HOTPLUG_CPU.
Reported-by: Dick Hollenbeck <dick@...tplc.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
---
kernel/cpu.c | 2 ++
kernel/sched/core.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 5366c8c69c2f..b9d7ac61d707 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -846,7 +846,9 @@ static int take_cpu_down(void *_param)
return 0;
}
+#ifdef CONFIG_PREEMPT_RT_BASE
struct task_struct *takedown_cpu_task;
+#endif
static int takedown_cpu(unsigned int cpu)
{
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e465381b464d..cbd76324babd 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7314,9 +7314,11 @@ void migrate_enable(void)
p->migrate_disable = 0;
rq->nr_pinned--;
+#ifdef CONFIG_HOTPLUG_CPU
if (rq->nr_pinned == 0 && unlikely(!cpu_active(cpu)) &&
takedown_cpu_task)
wake_up_process(takedown_cpu_task);
+#endif
if (!p->migrate_disable_scheduled)
goto out;
--
2.24.1
Powered by blists - more mailing lists