diff options
Diffstat (limited to 'debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch')
-rw-r--r-- | debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch b/debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch index 939abd4f1..53c6a029a 100644 --- a/debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch +++ b/debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:08 +0200 Subject: [PATCH 10/19] sched: Fix migrate_disable() vs set_cpus_allowed_ptr() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Concurrent migrate_disable() and set_cpus_allowed_ptr() has interesting features. We rely on set_cpus_allowed_ptr() to not return @@ -53,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1732,15 +1732,26 @@ void migrate_enable(void) +@@ -1730,15 +1730,26 @@ void migrate_enable(void) { struct task_struct *p = current; @@ -86,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL_GPL(migrate_enable); -@@ -1805,8 +1816,16 @@ static struct rq *move_queued_task(struc +@@ -1803,8 +1814,16 @@ static struct rq *move_queued_task(struc } struct migration_arg { @@ -105,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> }; /* -@@ -1838,16 +1857,19 @@ static struct rq *__migrate_task(struct +@@ -1836,16 +1855,19 @@ static struct rq *__migrate_task(struct */ static int migration_cpu_stop(void *data) { @@ -126,7 +126,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * We need to explicitly wake pending tasks before running * __migrate_task() such that we will not miss enforcing cpus_ptr -@@ -1857,21 +1879,83 @@ static int migration_cpu_stop(void *data +@@ -1855,21 +1877,83 @@ static int migration_cpu_stop(void *data raw_spin_lock(&p->pi_lock); rq_lock(rq, &rf); @@ -215,7 +215,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; } -@@ -1941,6 +2025,110 @@ void do_set_cpus_allowed(struct task_str +@@ -1939,6 +2023,110 @@ void do_set_cpus_allowed(struct task_str } /* @@ -326,7 +326,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Change a given task's CPU affinity. Migrate the thread to a * proper CPU and schedule it away if the CPU it's executing on * is removed from the allowed bitmask. -@@ -2009,23 +2197,8 @@ static int __set_cpus_allowed_ptr(struct +@@ -2007,23 +2195,8 @@ static int __set_cpus_allowed_ptr(struct p->nr_cpus_allowed != 1); } @@ -351,7 +351,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> out: task_rq_unlock(rq, p, &rf); -@@ -3210,6 +3383,7 @@ static void __sched_fork(unsigned long c +@@ -3207,6 +3380,7 @@ static void __sched_fork(unsigned long c init_numa_balancing(clone_flags, p); #ifdef CONFIG_SMP p->wake_entry.u_flags = CSD_TYPE_TTWU; |