diff options
Diffstat (limited to 'debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch')
-rw-r--r-- | debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch b/debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch new file mode 100644 index 000000000..14ea9d2e0 --- /dev/null +++ b/debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch @@ -0,0 +1,56 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 16 Aug 2019 12:25:35 +0200 +Subject: [PATCH 3/4] cgroup: Remove `may_sleep' from + cgroup_rstat_flush_locked() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz + +cgroup_rstat_flush_locked() is always invoked with `may_sleep' set to +true so that this case can be made default and the parameter removed. + +Remove the `may_sleep' parameter. + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/cgroup/rstat.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +--- a/kernel/cgroup/rstat.c ++++ b/kernel/cgroup/rstat.c +@@ -149,7 +149,7 @@ static struct cgroup *cgroup_rstat_cpu_p + } + + /* see cgroup_rstat_flush() */ +-static void cgroup_rstat_flush_locked(struct cgroup *cgrp, bool may_sleep) ++static void cgroup_rstat_flush_locked(struct cgroup *cgrp) + __releases(&cgroup_rstat_lock) __acquires(&cgroup_rstat_lock) + { + int cpu; +@@ -167,9 +167,7 @@ static void cgroup_rstat_flush_locked(st + + raw_spin_unlock(cpu_lock); + +- /* if @may_sleep, play nice and yield if necessary */ +- if (may_sleep && (need_resched() || +- spin_needbreak(&cgroup_rstat_lock))) { ++ if (need_resched() || spin_needbreak(&cgroup_rstat_lock)) { + spin_unlock_irq(&cgroup_rstat_lock); + if (!cond_resched()) + cpu_relax(); +@@ -196,7 +194,7 @@ void cgroup_rstat_flush(struct cgroup *c + might_sleep(); + + spin_lock_irq(&cgroup_rstat_lock); +- cgroup_rstat_flush_locked(cgrp, true); ++ cgroup_rstat_flush_locked(cgrp); + spin_unlock_irq(&cgroup_rstat_lock); + } + +@@ -214,7 +212,7 @@ static void cgroup_rstat_flush_hold(stru + { + might_sleep(); + spin_lock_irq(&cgroup_rstat_lock); +- cgroup_rstat_flush_locked(cgrp, true); ++ cgroup_rstat_flush_locked(cgrp); + } + + /** |