From: tip-bot for Frederic Weisbecker <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, efault@gmx.de, mingo@kernel.org,
torvalds@linux-foundation.org, kernellwp@gmail.com,
linux-kernel@vger.kernel.org, hpa@zytor.com, riel@redhat.com,
frederic@kernel.org, lcapitulino@redhat.com,
peterz@infradead.org, cmetcalf@mellanox.com, cl@linux.com,
paulmck@linux.vnet.ibm.com
Subject: [tip:sched/core] sched/isolation: Isolate workqueues when "nohz_full=" is set
Date: Wed, 21 Feb 2018 02:36:52 -0800 [thread overview]
Message-ID: <tip-1bda3f8087fce9063da0b8aef87f17a3fe541aca@git.kernel.org> (raw)
In-Reply-To: <1519186649-3242-5-git-send-email-frederic@kernel.org>
Commit-ID: 1bda3f8087fce9063da0b8aef87f17a3fe541aca
Gitweb: https://git.kernel.org/tip/1bda3f8087fce9063da0b8aef87f17a3fe541aca
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Wed, 21 Feb 2018 05:17:26 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 21 Feb 2018 09:49:08 +0100
sched/isolation: Isolate workqueues when "nohz_full=" is set
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.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Wanpeng Li <kernellwp@gmail.com>
Link: http://lkml.kernel.org/r/1519186649-3242-5-git-send-email-frederic@kernel.org
Signed-off-by: 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);
next prev parent reply other threads:[~2018-02-21 10:38 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 ` [PATCH 4/7] sched/isolation: Isolate workqueues when "nohz_full=" is set Frederic Weisbecker
2018-02-21 10:36 ` tip-bot for Frederic Weisbecker [this message]
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=tip-1bda3f8087fce9063da0b8aef87f17a3fe541aca@git.kernel.org \
--to=tipbot@zytor.com \
--cc=cl@linux.com \
--cc=cmetcalf@mellanox.com \
--cc=efault@gmx.de \
--cc=frederic@kernel.org \
--cc=hpa@zytor.com \
--cc=kernellwp@gmail.com \
--cc=lcapitulino@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@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 \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.