From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
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@kernel.org>
Subject: [PATCH tip/core/rcu 08/24] rcu/tree: Force quiescent state on callback overload
Date: Mon, 31 Aug 2020 11:01:00 -0700 [thread overview]
Message-ID: <20200831180116.32690-8-paulmck@kernel.org> (raw)
In-Reply-To: <20200831180050.GA32590@paulmck-ThinkPad-P72>
From: Neeraj Upadhyay <neeraju@codeaurora.org>
On callback overload, it is necessary to quickly detect idle CPUs,
and rcu_gp_fqs_check_wake() checks for this condition. Unfortunately,
the code following the call to this function does not repeat this check,
which means that in reality no actual quiescent-state forcing, instead
only a couple of quick and pointless wakeups at the beginning of the
grace period.
This commit therefore adds a check for the RCU_GP_FLAG_OVLD flag in
the post-wakeup "if" statement in rcu_gp_fqs_loop().
Fixes: 1fca4d12f4637 ("rcu: Expedite first two FQS scans under callback-overload conditions")
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
kernel/rcu/tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 8969120..4770d77 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1884,7 +1884,7 @@ static void rcu_gp_fqs_loop(void)
break;
/* If time for quiescent-state forcing, do it. */
if (!time_after(rcu_state.jiffies_force_qs, jiffies) ||
- (gf & RCU_GP_FLAG_FQS)) {
+ (gf & (RCU_GP_FLAG_FQS | RCU_GP_FLAG_OVLD))) {
trace_rcu_grace_period(rcu_state.name, rcu_state.gp_seq,
TPS("fqsstart"));
rcu_gp_fqs(first_gp_fqs);
--
2.9.5
next prev parent reply other threads:[~2020-08-31 18:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 18:00 [PATCH tip/core/rcu 0/24] Miscellaneous fixes for v5.10 Paul E. McKenney
2020-08-31 18:00 ` [PATCH tip/core/rcu 01/24] rcu: Remove KCSAN stubs paulmck
2020-08-31 18:00 ` [PATCH tip/core/rcu 02/24] rcu: Remove KCSAN stubs from update.c paulmck
2020-08-31 18:00 ` [PATCH tip/core/rcu 03/24] srcu: Remove KCSAN stubs paulmck
2020-08-31 18:00 ` [PATCH tip/core/rcu 04/24] rcu: Initialize at declaration time in rcu_exp_handler() paulmck
2020-08-31 18:00 ` [PATCH tip/core/rcu 05/24] rcu/trace: Print negative GP numbers correctly paulmck
2020-08-31 18:00 ` [PATCH tip/core/rcu 06/24] rcu/trace: Use gp_seq_req in acceleration's rcu_grace_period tracepoint paulmck
2020-08-31 18:00 ` [PATCH tip/core/rcu 07/24] nocb: Clarify RCU nocb CPU error message paulmck
2020-08-31 18:01 ` paulmck [this message]
2020-08-31 18:01 ` [PATCH tip/core/rcu 09/24] rcu/tree: Remove CONFIG_PREMPT_RCU check in force_qs_rnp() paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 10/24] nocb: Remove show_rcu_nocb_state() false positive printout paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 11/24] rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_divisor paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 12/24] rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_resched_ns paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 13/24] rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_kick_kthreads paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 14/24] rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_cpu_stall_ftrace_dump paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 15/24] rcu: Fix kerneldoc comments in rcupdate.h paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 16/24] rculist: Introduce list/hlist_for_each_entry_srcu() macros paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 17/24] kvm: mmu: page_track: Fix RCU list API usage paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 18/24] rcu: Move rcu_cpu_started per-CPU variable to rcu_data paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 19/24] rcu/nocb: Add a warning for non-GP kthread running GP code paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 20/24] rcu: Clarify comments about FQS loop reporting quiescent states paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 21/24] rcu: Make FQS more aggressive in complaining about offline CPUs paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 22/24] rcu: Remove unused __rcu_is_watching() function paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 23/24] rcu/segcblist: Prevent useless GP start if no CBs to accelerate paulmck
2020-08-31 18:01 ` [PATCH tip/core/rcu 24/24] rcu: Shrink each possible cpu krcp paulmck
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=20200831180116.32690-8-paulmck@kernel.org \
--to=paulmck@kernel.org \
--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=kernel-team@fb.com \
--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
all inboxes | Powered by JetHome®