From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com,
bobby.prani@gmail.com,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 06/10] rcu: Run grace-period kthreads at real-time priority
Date: Wed, 7 Jan 2015 09:52:44 -0800 [thread overview]
Message-ID: <1420653168-6434-6-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <1420653168-6434-1-git-send-email-paulmck@linux.vnet.ibm.com>
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
This is a experimental commit that attempts to better handle high-load
situations.
Not-yet-signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
init/Kconfig | 1 -
kernel/rcu/tree.c | 10 +++++++++-
kernel/rcu/tree_plugin.h | 4 ----
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index 9afb971497f4..8787131d0f5c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -669,7 +669,6 @@ config RCU_BOOST
config RCU_KTHREAD_PRIO
int "Real-time priority to use for RCU worker threads"
range 1 99
- depends on RCU_BOOST
default 1
help
This option specifies the SCHED_FIFO priority value that will be
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 5987fdc85fc4..7a8d7e0d23f6 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -156,6 +156,10 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
static void invoke_rcu_core(void);
static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp);
+/* rcuc/rcub kthread realtime priority */
+static int kthread_prio = CONFIG_RCU_KTHREAD_PRIO;
+module_param(kthread_prio, int, 0644);
+
/*
* Track the rcutorture test sequence number and the update version
* number within a given test. The rcutorture_testseq is incremented
@@ -3599,15 +3603,19 @@ static int __init rcu_spawn_gp_kthread(void)
unsigned long flags;
struct rcu_node *rnp;
struct rcu_state *rsp;
+ struct sched_param sp;
struct task_struct *t;
rcu_scheduler_fully_active = 1;
for_each_rcu_flavor(rsp) {
- t = kthread_run(rcu_gp_kthread, rsp, "%s", rsp->name);
+ t = kthread_create(rcu_gp_kthread, rsp, "%s", rsp->name);
BUG_ON(IS_ERR(t));
rnp = rcu_get_root(rsp);
raw_spin_lock_irqsave(&rnp->lock, flags);
rsp->gp_kthread = t;
+ sp.sched_priority = kthread_prio;
+ sched_setscheduler_nocheck(t, SCHED_FIFO, &sp);
+ wake_up_process(t);
raw_spin_unlock_irqrestore(&rnp->lock, flags);
}
rcu_spawn_nocb_kthreads();
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 81ff8b9a5a39..dcb32638f88b 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -34,10 +34,6 @@
#include "../locking/rtmutex_common.h"
-/* rcuc/rcub kthread realtime priority */
-static int kthread_prio = CONFIG_RCU_KTHREAD_PRIO;
-module_param(kthread_prio, int, 0644);
-
/*
* Control variables for per-CPU and per-rcu_node kthreads. These
* handle all flavors of RCU.
--
1.8.1.5
next prev parent reply other threads:[~2015-01-07 17:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 17:52 [PATCH tip/core/rcu 0/9] Stall-warning changes for 3.20 Paul E. McKenney
2015-01-07 17:52 ` [PATCH tip/core/rcu 01/10] rcu: Set default to RCU_CPU_STALL_INFO=y Paul E. McKenney
2015-01-07 17:52 ` [PATCH tip/core/rcu 02/10] rcutorture: Add checks for stall ending before dump start Paul E. McKenney
2015-01-07 17:52 ` [PATCH tip/core/rcu 03/10] rcu: Make RCU_CPU_STALL_INFO include number of fqs attempts Paul E. McKenney
2015-01-07 17:52 ` [PATCH tip/core/rcu 04/10] rcu: Improve diagnostics for spurious RCU CPU stall warnings Paul E. McKenney
2015-01-07 17:52 ` [PATCH tip/core/rcu 05/10] rcu: Handle gpnum/completed wrap while dyntick idle Paul E. McKenney
2015-01-07 17:52 ` Paul E. McKenney [this message]
2015-01-07 17:52 ` [PATCH tip/core/rcu 07/10] rcu: Make cond_resched_rcu_qs() apply to normal RCU flavors Paul E. McKenney
2015-01-07 17:52 ` [PATCH tip/core/rcu 08/10] rcu: Add GP-kthread-starvation checks to CPU stall warnings Paul E. McKenney
2015-01-07 17:52 ` [PATCH tip/core/rcu 09/10] rcu: Fix RCU CPU stall detection in tiny implementation Paul E. McKenney
2015-01-07 17:52 ` [PATCH tip/core/rcu 10/10] rcu: Initialize tiny RCU stall-warning timeouts at boot Paul E. McKenney
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=1420653168-6434-6-git-send-email-paulmck@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bobby.prani@gmail.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhart@linux.intel.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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).