From: Frederic Weisbecker <frederic@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Chris Metcalf <cmetcalf@mellanox.com>,
Thomas Gleixner <tglx@linutronix.de>,
Luiz Capitulino <lcapitulino@redhat.com>,
Christoph Lameter <cl@linux.com>,
"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
Ingo Molnar <mingo@kernel.org>, Wanpeng Li <kernellwp@gmail.com>,
Mike Galbraith <efault@gmx.de>, Rik van Riel <riel@redhat.com>
Subject: [PATCH 4/7] sched/isolation: Isolate workqueues when "nohz_full=" is set
Date: Wed, 21 Feb 2018 05:17:26 +0100 [thread overview]
Message-ID: <1519186649-3242-5-git-send-email-frederic@kernel.org> (raw)
In-Reply-To: <1519186649-3242-1-git-send-email-frederic@kernel.org>
As we prepare for offloading the residual 1hz scheduler ticks to
workqueue, let's affine those to housekeepers so that they don't
interrupt the CPUs that don't want to be disturbed.
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wanpeng Li <kernellwp@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
---
include/linux/sched/isolation.h | 1 +
kernel/sched/isolation.c | 3 ++-
kernel/workqueue.c | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h
index d849431..4a6582c 100644
--- a/include/linux/sched/isolation.h
+++ b/include/linux/sched/isolation.h
@@ -12,6 +12,7 @@ enum hk_flags {
HK_FLAG_SCHED = (1 << 3),
HK_FLAG_TICK = (1 << 4),
HK_FLAG_DOMAIN = (1 << 5),
+ HK_FLAG_WQ = (1 << 6),
};
#ifdef CONFIG_CPU_ISOLATION
diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
index b71b436..a2500c4 100644
--- a/kernel/sched/isolation.c
+++ b/kernel/sched/isolation.c
@@ -3,6 +3,7 @@
* any CPU: unbound workqueues, timers, kthreads and any offloadable work.
*
* Copyright (C) 2017 Red Hat, Inc., Frederic Weisbecker
+ * Copyright (C) 2017-2018 SUSE, Frederic Weisbecker
*
*/
@@ -119,7 +120,7 @@ static int __init housekeeping_nohz_full_setup(char *str)
{
unsigned int flags;
- flags = HK_FLAG_TICK | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC;
+ flags = HK_FLAG_TICK | HK_FLAG_WQ | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC;
return housekeeping_setup(str, flags);
}
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 017044c..593dbe7 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5565,12 +5565,13 @@ static void __init wq_numa_init(void)
int __init workqueue_init_early(void)
{
int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL };
+ int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
int i, cpu;
WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));
- cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_DOMAIN));
+ cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(hk_flags));
pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC);
--
2.7.4
next prev parent reply other threads:[~2018-02-21 4:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 4:17 [PATCH 0/7] isolation: 1Hz residual tick offloading v7 Frederic Weisbecker
2018-02-21 4:17 ` [PATCH 1/7] sched: Rename init_rq_hrtick to hrtick_rq_init Frederic Weisbecker
2018-02-21 10:35 ` [tip:sched/core] sched/core: Rename init_rq_hrtick() to hrtick_rq_init() tip-bot for Frederic Weisbecker
2018-02-21 4:17 ` [PATCH 2/7] nohz: Convert tick_nohz_tick_stopped() to bool Frederic Weisbecker
2018-02-21 8:29 ` Thomas Gleixner
2018-02-21 10:35 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2018-02-21 4:17 ` [PATCH 3/7] nohz: Allow to check if remote CPU tick is stopped Frederic Weisbecker
2018-02-21 10:36 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2018-02-21 4:17 ` Frederic Weisbecker [this message]
2018-02-21 10:36 ` [tip:sched/core] sched/isolation: Isolate workqueues when "nohz_full=" is set tip-bot for Frederic Weisbecker
2018-02-21 4:17 ` [PATCH 5/7] sched/isolation: Offload residual 1Hz scheduler tick Frederic Weisbecker
2018-02-21 10:37 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2018-02-21 4:17 ` [PATCH 6/7] sched/nohz: Remove the 1 Hz tick code Frederic Weisbecker
2018-02-21 10:37 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2018-02-21 4:17 ` [PATCH 7/7] sched/isolation: Update nohz documentation to explain tick offload Frederic Weisbecker
2018-02-21 8:30 ` Thomas Gleixner
2018-02-21 10:38 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519186649-3242-5-git-send-email-frederic@kernel.org \
--to=frederic@kernel.org \
--cc=cl@linux.com \
--cc=cmetcalf@mellanox.com \
--cc=efault@gmx.de \
--cc=kernellwp@gmail.com \
--cc=lcapitulino@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).