From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org, kernel-team@android.com,
Byungchul Park <byungchul.park@lge.com>,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
peterz@infradead.org, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH v2 1/3] rcu: Assign higher prio to RCU threads if rcutorture is built-in
Date: Wed, 20 Jun 2018 10:10:41 -0700 [thread overview]
Message-ID: <20180620171041.GY3593@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180619221419.41340-1-joel@joelfernandes.org>
On Tue, Jun 19, 2018 at 03:14:17PM -0700, Joel Fernandes wrote:
> From: "Joel Fernandes (Google)" <joel@joelfernandes.org>
>
> rcutorture boost tests fail even with CONFIG_RCU_BOOST set because
> rcutorture's threads are equal priority to the default RCU kthreads (RT
> class with priority of 1).
>
> This patch checks if RCU torture is built into the kernel and if so,
> assigns a higher priority to the RCU threads. With this the rcutorture
> boost tests pass.
>
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
I queued all three for testing and further review. I reworked the commit
logs a bit and also pulled the error string onto one line to make it
easier on people grepping for the message. Please let me know if I
messed anything up.
Thanx, Paul
> ---
> kernel/rcu/tree.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index deb2508be923..92c29439eba6 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -3884,12 +3884,16 @@ static int __init rcu_spawn_gp_kthread(void)
> struct task_struct *t;
>
> /* Force priority into range. */
> - if (IS_ENABLED(CONFIG_RCU_BOOST) && kthread_prio < 1)
> + if (IS_ENABLED(CONFIG_RCU_BOOST) && kthread_prio < 2
> + && IS_BUILTIN(CONFIG_RCU_TORTURE_TEST))
> + kthread_prio = 2;
> + else if (IS_ENABLED(CONFIG_RCU_BOOST) && kthread_prio < 1)
> kthread_prio = 1;
> else if (kthread_prio < 0)
> kthread_prio = 0;
> else if (kthread_prio > 99)
> kthread_prio = 99;
> +
> if (kthread_prio != kthread_prio_in)
> pr_alert("rcu_spawn_gp_kthread(): Limited prio to %d from %d\n",
> kthread_prio, kthread_prio_in);
> --
> 2.18.0.rc1.244.gcf134e6275-goog
>
next prev parent reply other threads:[~2018-06-20 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 22:14 [PATCH v2 1/3] rcu: Assign higher prio to RCU threads if rcutorture is built-in Joel Fernandes
2018-06-19 22:14 ` [PATCH v2 2/3] rcutorture: Add support to detect if boost kthread prio is too low Joel Fernandes
2018-06-19 22:14 ` [PATCH v2 3/3] rcutorture: Fix rcu_barrier successes counter Joel Fernandes
2018-06-20 17:10 ` Paul E. McKenney [this message]
2018-06-21 0:25 ` [PATCH v2 1/3] rcu: Assign higher prio to RCU threads if rcutorture is built-in Joel Fernandes
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=20180620171041.GY3593@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=byungchul.park@lge.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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 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).