From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, 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, rostedt@goodmis.org,
dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com,
fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com
Subject: Re: [PATCH RFC tip/core/rcu 2/5] rcu: Short-circuit normal GPs via expedited GPs
Date: Thu, 2 Jul 2015 12:35:45 -0700 [thread overview]
Message-ID: <20150702193545.GQ3717@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150702164816.GB19282@twins.programming.kicks-ass.net>
On Thu, Jul 02, 2015 at 06:48:16PM +0200, Peter Zijlstra wrote:
> On Thu, Jul 02, 2015 at 07:06:17AM -0700, Paul E. McKenney wrote:
> > Or is your point that RCU_GP_DONE_FQS is a bad name? Perhaps I should
> > change it to something like RCU_GP_DOING_FQS. Or am I still missing
> > something here?
>
> Yes, that might have been the root of my confusion.
OK, how about this, then?
Thanx, Paul
------------------------------------------------------------------------
rcu: Rename RCU_GP_DONE_FQS to RCU_GP_DOING_FQS
The grace-period kthread sleeps waiting to do a force-quiescent-state
scan, and when awakened sets rsp->gp_state to RCU_GP_DONE_FQS.
However, this is confusing because the kthread has not done the
force-quiescent-state, but is instead just starting to do it. This commit
therefore renames RCU_GP_DONE_FQS to RCU_GP_DOING_FQS in order to make
things a bit easier on reviewers.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 2afb8e8c5134..e1d9909fd59d 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2088,7 +2088,7 @@ static int __noreturn rcu_gp_kthread(void *arg)
rsp->gp_state = RCU_GP_WAIT_FQS;
ret = wait_event_interruptible_timeout(rsp->gp_wq,
rcu_gp_fqs_check_wake(rsp, &gf), j);
- rsp->gp_state = RCU_GP_DONE_FQS;
+ rsp->gp_state = RCU_GP_DOING_FQS;
/* Locking provides needed memory barriers. */
/* If grace period done, leave loop. */
if (!READ_ONCE(rnp->qsmask) &&
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index cb402b5c2e71..852b810df38e 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -533,7 +533,7 @@ struct rcu_state {
#define RCU_GP_WAIT_GPS 1 /* Wait for grace-period start. */
#define RCU_GP_DONE_GPS 2 /* Wait done for grace-period start. */
#define RCU_GP_WAIT_FQS 3 /* Wait for force-quiescent-state time. */
-#define RCU_GP_DONE_FQS 4 /* Wait done for force-quiescent-state time. */
+#define RCU_GP_DOING_FQS 4 /* Wait done for force-quiescent-state time. */
#define RCU_GP_CLEANUP 5 /* Grace-period cleanup started. */
#define RCU_GP_CLEANED 6 /* Grace-period cleanup complete. */
next prev parent reply other threads:[~2015-07-02 19:35 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 21:48 [PATCH RFC tip/core/rcu 0/5] Expedited grace periods encouraging normal ones Paul E. McKenney
2015-06-30 21:48 ` [PATCH RFC tip/core/rcu 1/5] rcu: Prepare for expedited GP driving normal GP Paul E. McKenney
2015-06-30 21:48 ` [PATCH RFC tip/core/rcu 2/5] rcu: Short-circuit normal GPs via expedited GPs Paul E. McKenney
2015-07-01 10:03 ` Peter Zijlstra
2015-07-01 13:42 ` Paul E. McKenney
2015-07-01 20:59 ` Paul E. McKenney
2015-07-01 10:05 ` Peter Zijlstra
2015-07-01 13:41 ` Paul E. McKenney
2015-07-01 13:48 ` Peter Zijlstra
2015-07-01 14:03 ` Paul E. McKenney
2015-07-02 12:03 ` Peter Zijlstra
2015-07-02 14:06 ` Paul E. McKenney
2015-07-02 16:48 ` Peter Zijlstra
2015-07-02 19:35 ` Paul E. McKenney [this message]
2015-07-06 14:52 ` Peter Zijlstra
2015-06-30 21:48 ` [PATCH RFC tip/core/rcu 3/5] rcutorture: Ensure that normal GPs advance without " Paul E. McKenney
2015-06-30 21:48 ` [PATCH RFC tip/core/rcu 4/5] rcu: Wake grace-period kthread at end of expedited grace period Paul E. McKenney
2015-06-30 21:48 ` [PATCH RFC tip/core/rcu 5/5] rcu: Limit expedited helping to every 10 ms or every 4th GP Paul E. McKenney
2015-06-30 21:56 ` Eric Dumazet
2015-06-30 22:10 ` Paul E. McKenney
2015-07-01 10:07 ` Peter Zijlstra
2015-07-01 13:45 ` Paul E. McKenney
2015-07-01 19:30 ` Paul E. McKenney
2015-06-30 22:00 ` [PATCH RFC tip/core/rcu 0/5] Expedited grace periods encouraging normal ones josh
2015-06-30 22:12 ` Paul E. McKenney
2015-06-30 23:46 ` josh
2015-07-01 0:15 ` Paul E. McKenney
2015-07-01 0:42 ` Josh Triplett
2015-07-01 3:37 ` Paul E. McKenney
2015-07-01 10:12 ` Peter Zijlstra
2015-07-01 14:01 ` Paul E. McKenney
2015-07-01 14:08 ` Eric Dumazet
2015-07-01 15:58 ` Paul E. McKenney
2015-07-01 15:43 ` Josh Triplett
2015-07-01 15:59 ` Paul E. McKenney
2015-07-01 10:09 ` Peter Zijlstra
2015-07-01 10:55 ` Peter Zijlstra
2015-07-01 14:00 ` Paul E. McKenney
2015-07-01 14:17 ` Peter Zijlstra
2015-07-01 16:17 ` Paul E. McKenney
2015-07-01 17:02 ` Peter Zijlstra
2015-07-01 20:09 ` Paul E. McKenney
2015-07-01 21:20 ` josh
2015-07-01 21:49 ` Paul E. McKenney
2015-07-02 7:47 ` Ingo Molnar
2015-07-02 13:58 ` Paul E. McKenney
2015-07-02 18:35 ` Ingo Molnar
2015-07-02 18:47 ` Mathieu Desnoyers
2015-07-02 19:23 ` Paul E. McKenney
2015-07-02 21:07 ` Mathieu Desnoyers
2015-07-02 19:22 ` Paul E. McKenney
2015-07-02 1:11 ` Mike Galbraith
2015-07-02 1:34 ` josh
2015-07-02 1:59 ` Mike Galbraith
2015-07-02 2:18 ` Paul E. McKenney
2015-07-02 2:50 ` Mike Galbraith
2015-07-02 3:15 ` 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=20150702193545.GQ3717@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 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.