summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0316-sched-migrate_enable-Remove-__schedule-call.patch
blob: c482f3dcde1ab9bdf212d2c88ed6adb3296b25d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Scott Wood <swood@redhat.com>
Date: Fri, 24 Jan 2020 06:11:47 -0500
Subject: [PATCH 316/354] sched: migrate_enable: Remove __schedule() call
Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c61a1d147ace3541a44386351841dc46be6ba897

[ Upstream commit b8162e61e9a33bd1de6452eb838fbf50a93ddd9a ]

We can rely on preempt_enable() to schedule.  Besides simplifying the
code, this potentially allows sequences such as the following to be
permitted:

migrate_disable();
preempt_disable();
migrate_enable();
preempt_enable();

Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Scott Wood <swood@redhat.com>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 kernel/sched/core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f60ae431ad64..b58b1fbbccac 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7348,7 +7348,6 @@ void migrate_enable(void)
 		stop_one_cpu_nowait(task_cpu(p), migration_cpu_stop,
 				    arg, work);
 		tlb_migrate_finish(p->mm);
-		__schedule(true);
 	}
 
 out: