summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch')
-rw-r--r--debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch60
1 files changed, 30 insertions, 30 deletions
diff --git a/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch b/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
index 5cf67afda..550aa679e 100644
--- a/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
+++ b/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
@@ -1,7 +1,7 @@
From: Mike Galbraith <efault@gmx.de>
Date: Sun, 8 Jan 2017 09:32:25 +0100
Subject: [PATCH] cpuset: Convert callback_lock to raw_spinlock_t
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz
The two commits below add up to a cpuset might_sleep() splat for RT:
@@ -51,16 +51,16 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
-@@ -333,7 +333,7 @@ static struct cpuset top_cpuset = {
- */
+@@ -345,7 +345,7 @@ void cpuset_read_unlock(void)
+ percpu_up_read(&cpuset_rwsem);
+ }
- static DEFINE_MUTEX(cpuset_mutex);
-static DEFINE_SPINLOCK(callback_lock);
+static DEFINE_RAW_SPINLOCK(callback_lock);
static struct workqueue_struct *cpuset_migrate_mm_wq;
-@@ -1234,7 +1234,7 @@ static int update_parent_subparts_cpumas
+@@ -1255,7 +1255,7 @@ static int update_parent_subparts_cpumas
* Newly added CPUs will be removed from effective_cpus and
* newly deleted ones will be added back to effective_cpus.
*/
@@ -69,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (adding) {
cpumask_or(parent->subparts_cpus,
parent->subparts_cpus, tmp->addmask);
-@@ -1253,7 +1253,7 @@ static int update_parent_subparts_cpumas
+@@ -1274,7 +1274,7 @@ static int update_parent_subparts_cpumas
}
parent->nr_subparts_cpus = cpumask_weight(parent->subparts_cpus);
@@ -78,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return cmd == partcmd_update;
}
-@@ -1358,7 +1358,7 @@ static void update_cpumasks_hier(struct
+@@ -1379,7 +1379,7 @@ static void update_cpumasks_hier(struct
continue;
rcu_read_unlock();
@@ -87,7 +87,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
cpumask_copy(cp->effective_cpus, tmp->new_cpus);
if (cp->nr_subparts_cpus &&
-@@ -1389,7 +1389,7 @@ static void update_cpumasks_hier(struct
+@@ -1410,7 +1410,7 @@ static void update_cpumasks_hier(struct
= cpumask_weight(cp->subparts_cpus);
}
}
@@ -96,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
WARN_ON(!is_in_v2_mode() &&
!cpumask_equal(cp->cpus_allowed, cp->effective_cpus));
-@@ -1507,7 +1507,7 @@ static int update_cpumask(struct cpuset
+@@ -1528,7 +1528,7 @@ static int update_cpumask(struct cpuset
return -EINVAL;
}
@@ -105,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
cpumask_copy(cs->cpus_allowed, trialcs->cpus_allowed);
/*
-@@ -1518,7 +1518,7 @@ static int update_cpumask(struct cpuset
+@@ -1539,7 +1539,7 @@ static int update_cpumask(struct cpuset
cs->cpus_allowed);
cs->nr_subparts_cpus = cpumask_weight(cs->subparts_cpus);
}
@@ -114,7 +114,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
update_cpumasks_hier(cs, &tmp);
-@@ -1712,9 +1712,9 @@ static void update_nodemasks_hier(struct
+@@ -1733,9 +1733,9 @@ static void update_nodemasks_hier(struct
continue;
rcu_read_unlock();
@@ -126,7 +126,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
WARN_ON(!is_in_v2_mode() &&
!nodes_equal(cp->mems_allowed, cp->effective_mems));
-@@ -1782,9 +1782,9 @@ static int update_nodemask(struct cpuset
+@@ -1803,9 +1803,9 @@ static int update_nodemask(struct cpuset
if (retval < 0)
goto done;
@@ -138,7 +138,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* use trialcs->mems_allowed as a temp variable */
update_nodemasks_hier(cs, &trialcs->mems_allowed);
-@@ -1875,9 +1875,9 @@ static int update_flag(cpuset_flagbits_t
+@@ -1896,9 +1896,9 @@ static int update_flag(cpuset_flagbits_t
spread_flag_changed = ((is_spread_slab(cs) != is_spread_slab(trialcs))
|| (is_spread_page(cs) != is_spread_page(trialcs)));
@@ -150,7 +150,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!cpumask_empty(trialcs->cpus_allowed) && balance_flag_changed)
rebuild_sched_domains_locked();
-@@ -2380,7 +2380,7 @@ static int cpuset_common_seq_show(struct
+@@ -2407,7 +2407,7 @@ static int cpuset_common_seq_show(struct
cpuset_filetype_t type = seq_cft(sf)->private;
int ret = 0;
@@ -159,7 +159,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
switch (type) {
case FILE_CPULIST:
-@@ -2402,7 +2402,7 @@ static int cpuset_common_seq_show(struct
+@@ -2429,7 +2429,7 @@ static int cpuset_common_seq_show(struct
ret = -EINVAL;
}
@@ -168,7 +168,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return ret;
}
-@@ -2712,14 +2712,14 @@ static int cpuset_css_online(struct cgro
+@@ -2742,14 +2742,14 @@ static int cpuset_css_online(struct cgro
cpuset_inc();
@@ -185,7 +185,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!test_bit(CGRP_CPUSET_CLONE_CHILDREN, &css->cgroup->flags))
goto out_unlock;
-@@ -2746,12 +2746,12 @@ static int cpuset_css_online(struct cgro
+@@ -2776,12 +2776,12 @@ static int cpuset_css_online(struct cgro
}
rcu_read_unlock();
@@ -198,27 +198,27 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
- spin_unlock_irq(&callback_lock);
+ raw_spin_unlock_irq(&callback_lock);
out_unlock:
- mutex_unlock(&cpuset_mutex);
- return 0;
-@@ -2804,7 +2804,7 @@ static void cpuset_css_free(struct cgrou
+ percpu_up_write(&cpuset_rwsem);
+ put_online_cpus();
+@@ -2837,7 +2837,7 @@ static void cpuset_css_free(struct cgrou
static void cpuset_bind(struct cgroup_subsys_state *root_css)
{
- mutex_lock(&cpuset_mutex);
+ percpu_down_write(&cpuset_rwsem);
- spin_lock_irq(&callback_lock);
+ raw_spin_lock_irq(&callback_lock);
if (is_in_v2_mode()) {
cpumask_copy(top_cpuset.cpus_allowed, cpu_possible_mask);
-@@ -2815,7 +2815,7 @@ static void cpuset_bind(struct cgroup_su
+@@ -2848,7 +2848,7 @@ static void cpuset_bind(struct cgroup_su
top_cpuset.mems_allowed = top_cpuset.effective_mems;
}
- spin_unlock_irq(&callback_lock);
+ raw_spin_unlock_irq(&callback_lock);
- mutex_unlock(&cpuset_mutex);
+ percpu_up_write(&cpuset_rwsem);
}
-@@ -2916,12 +2916,12 @@ hotplug_update_tasks_legacy(struct cpuse
+@@ -2945,12 +2945,12 @@ hotplug_update_tasks_legacy(struct cpuse
{
bool is_empty;
@@ -233,7 +233,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* Don't call update_tasks_cpumask() if the cpuset becomes empty,
-@@ -2958,10 +2958,10 @@ hotplug_update_tasks(struct cpuset *cs,
+@@ -2987,10 +2987,10 @@ hotplug_update_tasks(struct cpuset *cs,
if (nodes_empty(*new_mems))
*new_mems = parent_cs(cs)->effective_mems;
@@ -246,7 +246,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (cpus_updated)
update_tasks_cpumask(cs);
-@@ -3116,7 +3116,7 @@ static void cpuset_hotplug_workfn(struct
+@@ -3145,7 +3145,7 @@ static void cpuset_hotplug_workfn(struct
/* synchronize cpus_allowed to cpu_active_mask */
if (cpus_updated) {
@@ -255,7 +255,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!on_dfl)
cpumask_copy(top_cpuset.cpus_allowed, &new_cpus);
/*
-@@ -3136,17 +3136,17 @@ static void cpuset_hotplug_workfn(struct
+@@ -3165,17 +3165,17 @@ static void cpuset_hotplug_workfn(struct
}
}
cpumask_copy(top_cpuset.effective_cpus, &new_cpus);
@@ -276,7 +276,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
update_tasks_nodemask(&top_cpuset);
}
-@@ -3247,11 +3247,11 @@ void cpuset_cpus_allowed(struct task_str
+@@ -3276,11 +3276,11 @@ void cpuset_cpus_allowed(struct task_str
{
unsigned long flags;
@@ -290,7 +290,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
/**
-@@ -3312,11 +3312,11 @@ nodemask_t cpuset_mems_allowed(struct ta
+@@ -3341,11 +3341,11 @@ nodemask_t cpuset_mems_allowed(struct ta
nodemask_t mask;
unsigned long flags;
@@ -304,7 +304,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return mask;
}
-@@ -3408,14 +3408,14 @@ bool __cpuset_node_allowed(int node, gfp
+@@ -3437,14 +3437,14 @@ bool __cpuset_node_allowed(int node, gfp
return true;
/* Not hardwall and node outside mems_allowed: scan up cpusets */