integ/kernel/kernel-rt/centos/patches/Affine-irqs-and-workqueues-with-kthread_cpus.patch
Martin, Chen 3de433a3b1 rebase rt kernel patch to CentOS7.6 3.10.0-957.1.3
timer-Reduce-timer-migration-overhead-if-disabled.patch
timer-Minimize-nohz-off-overhead.patch
two patches already included in upgraded kernel
remove description in meta patch.

fix compile error in drbd_req.c for improper usage of
request queue API; fix warning in kernel/bpf/core.c
for implicit declaration trace call for CFLAG
-Werror-implicit-function-declaration.

remove patch change is_swiotlb_buffer in lib/swiotlb.c
As change already in new kernel code.

explicitly disable three config, CONFIG_TORTURE_TEST=n,
CONFIG_RCU_TORTURE_TEST=n, CONFIG_LOCK_TORTURE_TEST=n.
As torture.c, locktorture.c, rcutorture.c are introduced
by new kernel release, which request CONFIG_PERCPU_RWSEM
be enabled. But config file generated by merge
kernel-3.10.0-x86_64-rt.config in source rpm and
kernel-3.10.0-x86_64-rt.config.tis_extra in meta_patch,
disable CONFIG_PERCPU_RWSEM, which makes build error
with "undefined symbol". These three file are built to
generate one module for one upper layer torture test
tool, so explicitly disable these config.

Depends-On: https://review.openstack.org/625773/
Story: 2004521
Task: 28352

Change-Id: I0f7e7db51aa38e98eae1219196a926ed8fc1b152
Signed-off-by: Martin, Chen <haochuan.z.chen@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2019-01-22 20:23:07 +08:00

74 lines
2.7 KiB
Diff

From 1584ae45f750efec21265fb0b8ac6a02975dfb76 Mon Sep 17 00:00:00 2001
Message-Id: <1584ae45f750efec21265fb0b8ac6a02975dfb76.1528226387.git.Jim.Somerville@windriver.com>
In-Reply-To: <c8270e79f6b7008fde44b8d5aa6314d8cf89d3ed.1528226387.git.Jim.Somerville@windriver.com>
References: <c8270e79f6b7008fde44b8d5aa6314d8cf89d3ed.1528226387.git.Jim.Somerville@windriver.com>
From: Chris Friesen <chris.friesen@windriver.com>
Date: Tue, 24 Nov 2015 16:27:29 -0500
Subject: [PATCH 05/32] Affine irqs and workqueues with kthread_cpus
If the kthread_cpus boot arg is set it means we want to affine
kernel threads to the specified CPU mask as much as possible
in order to avoid doing work on other CPUs.
In this commit we extend the meaning of that boot arg to also
apply to the CPU affinity of unbound and ordered workqueues.
We also use the kthread_cpus value to determine the default irq
affinity. Specifically, as long as the previously-calculated
irq affinity intersects with the kthread_cpus affinity then we'll
use the intersection of the two as the default irq affinity.
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
[VT: replacing spaces with tabs. Performed tests]
Signed-off-by: Vu Tran <vu.tran@windriver.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
kernel/irq/manage.c | 7 +++++++
kernel/workqueue.c | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index bd59426..bad147c 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -410,6 +410,13 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
if (cpumask_intersects(mask, nodemask))
cpumask_and(mask, mask, nodemask);
}
+
+ /* This will narrow down the affinity further if we've specified
+ * a reduced cpu_kthread_mask in the boot args.
+ */
+ if (cpumask_intersects(mask, cpu_kthread_mask))
+ cpumask_and(mask, mask, cpu_kthread_mask);
+
irq_do_set_affinity(&desc->irq_data, mask, false);
return 0;
}
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 986e283..7160e71 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5483,6 +5483,8 @@ static int __init init_workqueues(void)
BUG_ON(!(attrs = alloc_workqueue_attrs(GFP_KERNEL)));
attrs->nice = std_nice[i];
+ /* If we've specified a kthread mask apply it here too. */
+ cpumask_copy(attrs->cpumask, cpu_kthread_mask);
unbound_std_wq_attrs[i] = attrs;
/*
@@ -5493,6 +5495,8 @@ static int __init init_workqueues(void)
BUG_ON(!(attrs = alloc_workqueue_attrs(GFP_KERNEL)));
attrs->nice = std_nice[i];
attrs->no_numa = true;
+ /* If we've specified a kthread mask apply it here too. */
+ cpumask_copy(attrs->cpumask, cpu_kthread_mask);
ordered_wq_attrs[i] = attrs;
}
--
1.8.3.1