bab9bb6b69
Create new directories: ceph config config-files filesystem kernel kernel/kernel-modules ldap logging strorage-drivers tools utilities virt Retire directories: connectivity core devtools support extended Delete two packages: tgt irqbalance Relocated packages: base/ dhcp initscripts libevent lighttpd linuxptp memcached net-snmp novnc ntp openssh pam procps sanlock shadow sudo systemd util-linux vim watchdog ceph/ python-cephclient config/ facter puppet-4.8.2 puppet-modules filesystem/ e2fsprogs nfs-utils nfscheck kernel/ kernel-std kernel-rt kernel/kernel-modules/ mlnx-ofa_kernel ldap/ nss-pam-ldapd openldap logging/ syslog-ng logrotate networking/ lldpd iproute mellanox python-ryu mlx4-config python/ python-2.7.5 python-django python-gunicorn python-setuptools python-smartpm python-voluptuous security/ shim-signed shim-unsigned tboot strorage-drivers/ python-3parclient python-lefthandclient virt/ cloud-init libvirt libvirt-python qemu tools/ storage-topology vm-topology utilities/ tis-extensions namespace-utils nova-utils update-motd Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86 Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
74 lines
2.7 KiB
Diff
74 lines
2.7 KiB
Diff
From e223cda3a8edd8fd935d589231c8e19a66bd8947 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <e223cda3a8edd8fd935d589231c8e19a66bd8947.1527544850.git.Jim.Somerville@windriver.com>
|
|
In-Reply-To: <b6ceef1c915827b50ce3f76da4dc47f3eb768b44.1527544850.git.Jim.Somerville@windriver.com>
|
|
References: <b6ceef1c915827b50ce3f76da4dc47f3eb768b44.1527544850.git.Jim.Somerville@windriver.com>
|
|
From: Chris Friesen <chris.friesen@windriver.com>
|
|
Date: Tue, 24 Nov 2015 16:27:29 -0500
|
|
Subject: [PATCH 06/26] 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 e639145..be46349 100644
|
|
--- a/kernel/irq/manage.c
|
|
+++ b/kernel/irq/manage.c
|
|
@@ -366,6 +366,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 179cbb2..9524a6f 100644
|
|
--- a/kernel/workqueue.c
|
|
+++ b/kernel/workqueue.c
|
|
@@ -5424,6 +5424,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;
|
|
|
|
/*
|
|
@@ -5434,6 +5436,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
|
|
|