From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
jiangshanlai@gmail.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,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
Neeraj Upadhyay <neeraju@codeaurora.org>,
"Paul E . McKenney" <paulmck@linux.ibm.com>
Subject: [PATCH tip/core/rcu 12/18] rcu: Default jiffies_to_sched_qs to jiffies_till_sched_qs
Date: Tue, 26 Mar 2019 16:13:08 -0700 [thread overview]
Message-ID: <20190326231314.19518-12-paulmck@linux.ibm.com> (raw)
In-Reply-To: <20190326231253.GA18343@linux.ibm.com>
From: Neeraj Upadhyay <neeraju@codeaurora.org>
The current code only calls adjust_jiffies_till_sched_qs() if
jiffies_till_sched_qs is left at its default value, so when the
jiffies_till_sched_qs kernel-boot parameter actually is specified,
jiffies_to_sched_qs will be left with the value zero, which
will result in useless slowdowns of cond_resched(). This commit
therefore changes rcu_init_geometry() to unconditionally invoke
adjust_jiffies_till_sched_qs(), which ensures that jiffies_to_sched_qs
will be initialized in all cases, thus maintaining good cond_resched()
performance.
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
---
kernel/rcu/tree.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 139fa1f5c537..466299c3d2da 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3739,8 +3739,7 @@ static void __init rcu_init_geometry(void)
jiffies_till_first_fqs = d;
if (jiffies_till_next_fqs == ULONG_MAX)
jiffies_till_next_fqs = d;
- if (jiffies_till_sched_qs == ULONG_MAX)
- adjust_jiffies_till_sched_qs();
+ adjust_jiffies_till_sched_qs();
/* If the compile-time values are accurate, just leave. */
if (rcu_fanout_leaf == RCU_FANOUT_LEAF &&
--
2.17.1
next prev parent reply other threads:[~2019-03-26 23:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 23:12 [PATCH tip/core/rcu 0/18] Miscellaneous fixes for v5.2 Paul E. McKenney
2019-03-26 23:12 ` [PATCH tip/core/rcu 01/18] rcu: Unconditionally expedite during suspend/hibernate Paul E. McKenney
2019-03-26 23:12 ` [PATCH tip/core/rcu 02/18] rcu: Avoid unnecessary softirq when system is idle Paul E. McKenney
2019-03-26 23:12 ` [PATCH tip/core/rcu 03/18] rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 04/18] rcu: Make exit_rcu() handle non-preempted RCU readers Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 05/18] rcu: Set rcutree.kthread_prio sysfs access to read-only Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 06/18] MAINTAINERS: RCU now has its own email list Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 07/18] MAINTAINERS: Add -rcu branch name ("dev") Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 08/18] rcu: Move common code out of if-else block Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 09/18] rcu: Allow rcu_nocbs= to specify all CPUs Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 10/18] rcu: Report error for bad rcu_nocbs= parameter values Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 11/18] rcu: Fix self-wakeups for grace-period kthread Paul E. McKenney
2019-03-26 23:13 ` Paul E. McKenney [this message]
2019-03-26 23:13 ` [PATCH tip/core/rcu 13/18] rcu: Do a single rhp->func read in rcu_head_after_call_rcu() Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 14/18] rcu: Update jiffies_to_sched_qs and adjust_jiffies_till_sched_qs() comments Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 15/18] rcu: Fix force_qs_rnp() header comment Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 16/18] rcu: Eliminate redundant NULL-pointer check Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 17/18] rcu: Fix typo in tree_exp.h comment Paul E. McKenney
2019-03-26 23:13 ` [PATCH tip/core/rcu 18/18] rcu: Correct READ_ONCE()/WRITE_ONCE() for ->rcu_read_unlock_special 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=20190326231314.19518-12-paulmck@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=neeraju@codeaurora.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.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).