[linux] 01/01: sched/topology: Add missing pieces of the fixes included in 3.16.49
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon Dec 11 23:31:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch jessie
in repository linux.
commit 67624fcaf0688ddd07e4083c16caf64b58631bbf
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Mon Dec 11 23:28:06 2017 +0000
sched/topology: Add missing pieces of the fixes included in 3.16.49
Closes: #883938
I reviewed the upstream series of commits and found these that are
likely dependencies of the fixes I already applied in 3.16.49, not
just cleanup or optimisation. Salvatore confirmed that together they
fixed the boot crash on one test system.
---
debian/changelog | 10 ++++
.../sched-topology-optimize-build_group_mask.patch | 57 ++++++++++++++++++++
.../sched-topology-remove-force_sd_overlap.patch | 48 +++++++++++++++++
...ology-simplify-build_overlap_sched_groups.patch | 61 ++++++++++++++++++++++
debian/patches/series | 3 ++
5 files changed, 179 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 977e1ce..03b7a39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+linux (3.16.51-3) UNRELEASED; urgency=medium
+
+ * sched/topology: Add missing pieces of the fixes included in 3.16.49
+ (Closes: #883938):
+ - Remove FORCE_SD_OVERLAP
+ - Simplify build_overlap_sched_groups()
+ - Optimize build_group_mask()
+
+ -- Ben Hutchings <ben at decadent.org.uk> Mon, 11 Dec 2017 23:22:02 +0000
+
linux (3.16.51-2) jessie; urgency=medium
* [mips*] inst: Avoid ABI change in 3.16.51
diff --git a/debian/patches/bugfix/all/sched-topology-optimize-build_group_mask.patch b/debian/patches/bugfix/all/sched-topology-optimize-build_group_mask.patch
new file mode 100644
index 0000000..39546a2
--- /dev/null
+++ b/debian/patches/bugfix/all/sched-topology-optimize-build_group_mask.patch
@@ -0,0 +1,57 @@
+From: Lauro Ramos Venancio <lvenanci at redhat.com>
+Date: Thu, 20 Apr 2017 16:51:40 -0300
+Subject: sched/topology: Optimize build_group_mask()
+Origin: https://git.kernel.org/linus/f32d782e31bf079f600dcec126ed117b0577e85c
+Bug-Debian: https://bugs.debian.org/883938
+
+The group mask is always used in intersection with the group CPUs. So,
+when building the group mask, we don't have to care about CPUs that are
+not part of the group.
+
+Signed-off-by: Lauro Ramos Venancio <lvenanci at redhat.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
+Cc: Linus Torvalds <torvalds at linux-foundation.org>
+Cc: Mike Galbraith <efault at gmx.de>
+Cc: Peter Zijlstra <peterz at infradead.org>
+Cc: Thomas Gleixner <tglx at linutronix.de>
+Cc: lwang at redhat.com
+Cc: riel at redhat.com
+Link: http://lkml.kernel.org/r/1492717903-5195-2-git-send-email-lvenanci@redhat.com
+Signed-off-by: Ingo Molnar <mingo at kernel.org>
+[bwh: Backported to 3.16:
+ - Update another reference to 'span' introduced by an earlier backport of
+ sched/topology changes
+ - Adjust filename]
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ kernel/sched/core.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -5782,14 +5782,14 @@ enum s_alloc {
+ static void
+ build_group_mask(struct sched_domain *sd, struct sched_group *sg, struct cpumask *mask)
+ {
+- const struct cpumask *span = sched_domain_span(sd);
++ const struct cpumask *sg_span = sched_group_cpus(sg);
+ struct sd_data *sdd = sd->private;
+ struct sched_domain *sibling;
+ int i;
+
+ cpumask_clear(mask);
+
+- for_each_cpu(i, span) {
++ for_each_cpu(i, sg_span) {
+ sibling = *per_cpu_ptr(sdd->sd, i);
+
+ /*
+@@ -5801,7 +5801,7 @@ build_group_mask(struct sched_domain *sd
+ continue;
+
+ /* If we would not end up here, we can't continue from here */
+- if (!cpumask_equal(span, sched_domain_span(sibling->child)))
++ if (!cpumask_equal(sg_span, sched_domain_span(sibling->child)))
+ continue;
+
+ cpumask_set_cpu(i, mask);
diff --git a/debian/patches/bugfix/all/sched-topology-remove-force_sd_overlap.patch b/debian/patches/bugfix/all/sched-topology-remove-force_sd_overlap.patch
new file mode 100644
index 0000000..8b08830
--- /dev/null
+++ b/debian/patches/bugfix/all/sched-topology-remove-force_sd_overlap.patch
@@ -0,0 +1,48 @@
+From: Peter Zijlstra <peterz at infradead.org>
+Date: Wed, 26 Apr 2017 17:36:41 +0200
+Subject: sched/topology: Remove FORCE_SD_OVERLAP
+Origin: https://git.kernel.org/linus/af85596c74de2fd9abb87501ae280038ac28a3f4
+Bug-Debian: https://bugs.debian.org/883938
+
+Its an obsolete debug mechanism and future code wants to rely on
+properties this undermines.
+
+Namely, it would be good to assume that SD_OVERLAP domains have
+children, but if we build the entire hierarchy with SD_OVERLAP this is
+obviously false.
+
+Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
+Cc: Linus Torvalds <torvalds at linux-foundation.org>
+Cc: Mike Galbraith <efault at gmx.de>
+Cc: Peter Zijlstra <peterz at infradead.org>
+Cc: Thomas Gleixner <tglx at linutronix.de>
+Cc: linux-kernel at vger.kernel.org
+Signed-off-by: Ingo Molnar <mingo at kernel.org>
+[bwh: Backported to 3.16: adjust filename]
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ kernel/sched/core.c | 2 +-
+ kernel/sched/features.h | 1 -
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -6631,7 +6631,7 @@ static int build_sched_domains(const str
+ sd = build_sched_domain(tl, cpu_map, attr, sd, i);
+ if (tl == sched_domain_topology)
+ *per_cpu_ptr(d.sd, i) = sd;
+- if (tl->flags & SDTL_OVERLAP || sched_feat(FORCE_SD_OVERLAP))
++ if (tl->flags & SDTL_OVERLAP)
+ sd->flags |= SD_OVERLAP;
+ if (cpumask_equal(cpu_map, sched_domain_span(sd)))
+ break;
+--- a/kernel/sched/features.h
++++ b/kernel/sched/features.h
+@@ -56,7 +56,6 @@ SCHED_FEAT(NONTASK_CAPACITY, true)
+ */
+ SCHED_FEAT(TTWU_QUEUE, true)
+
+-SCHED_FEAT(FORCE_SD_OVERLAP, false)
+ SCHED_FEAT(RT_RUNTIME_SHARE, true)
+ SCHED_FEAT(LB_MIN, false)
+
diff --git a/debian/patches/bugfix/all/sched-topology-simplify-build_overlap_sched_groups.patch b/debian/patches/bugfix/all/sched-topology-simplify-build_overlap_sched_groups.patch
new file mode 100644
index 0000000..22b3143
--- /dev/null
+++ b/debian/patches/bugfix/all/sched-topology-simplify-build_overlap_sched_groups.patch
@@ -0,0 +1,61 @@
+From: Peter Zijlstra <peterz at infradead.org>
+Date: Fri, 14 Apr 2017 17:32:07 +0200
+Subject: sched/topology: Simplify build_overlap_sched_groups()
+Origin: https://git.kernel.org/linus/91eaed0d61319f58a9f8e43d41a8cbb069b4f73d
+Bug-Debian: https://bugs.debian.org/883938
+
+Now that the first group will always be the previous domain of this
+ at cpu this can be simplified.
+
+In fact, writing the code now removed should've been a big clue I was
+doing it wrong :/
+
+Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
+Cc: Linus Torvalds <torvalds at linux-foundation.org>
+Cc: Mike Galbraith <efault at gmx.de>
+Cc: Peter Zijlstra <peterz at infradead.org>
+Cc: Thomas Gleixner <tglx at linutronix.de>
+Cc: linux-kernel at vger.kernel.org
+Signed-off-by: Ingo Molnar <mingo at kernel.org>
+[bwh: Backported to 3.16: adjust filename, context]
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ kernel/sched/core.c | 13 ++-----------
+ 1 file changed, 2 insertions(+), 11 deletions(-)
+
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -5869,7 +5869,7 @@ static void init_overlap_sched_group(str
+ static int
+ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
+ {
+- struct sched_group *first = NULL, *last = NULL, *groups = NULL, *sg;
++ struct sched_group *first = NULL, *last = NULL, *sg;
+ const struct cpumask *span = sched_domain_span(sd);
+ struct cpumask *covered = sched_domains_tmpmask;
+ struct sd_data *sdd = sd->private;
+@@ -5899,15 +5899,6 @@ build_overlap_sched_groups(struct sched_
+
+ init_overlap_sched_group(sd, sg);
+
+- /*
+- * Make sure the first group of this domain contains the
+- * canonical balance cpu. Otherwise the sched_domain iteration
+- * breaks. See update_sg_lb_stats().
+- */
+- if ((!groups && cpumask_test_cpu(cpu, sg_span)) ||
+- group_balance_cpu(sg) == cpu)
+- groups = sg;
+-
+ if (!first)
+ first = sg;
+ if (last)
+@@ -5915,7 +5906,7 @@ build_overlap_sched_groups(struct sched_
+ last = sg;
+ last->next = first;
+ }
+- sd->groups = groups;
++ sd->groups = first;
+
+ return 0;
+
diff --git a/debian/patches/series b/debian/patches/series
index 4cd4a73..0655b59 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -251,6 +251,9 @@ bugfix/all/vfs-avoid-creation-of-inode-number-0-in-get_next_ino.patch
bugfix/all/mm-mmap.c-expand_downwards-don-t-require-the-gap-if-.patch
bugfix/x86/mmap-remember-the-map_fixed-flag-as-vm_fixed.patch
bugfix/x86/mmap-add-an-exception-to-the-stack-gap-for-hotspot-jvm.patch
+bugfix/all/sched-topology-remove-force_sd_overlap.patch
+bugfix/all/sched-topology-simplify-build_overlap_sched_groups.patch
+bugfix/all/sched-topology-optimize-build_group_mask.patch
# memfd_create() & kdbus backport
features/all/kdbus/mm-allow-drivers-to-prevent-new-writable-mappings.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list