Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1558890 > unrolled thread

[PATCH tip/core/rcu 13/20] rcu: Don't wake rcuc/X kthreads on NOCB CPUs

Started by"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
First post2017-01-14 10:20 +0100
Last post2017-01-14 10:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH tip/core/rcu 13/20] rcu: Don't wake rcuc/X kthreads on NOCB CPUs "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-14 10:20 +0100

#1558890 — [PATCH tip/core/rcu 13/20] rcu: Don't wake rcuc/X kthreads on NOCB CPUs

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2017-01-14 10:20 +0100
Subject[PATCH tip/core/rcu 13/20] rcu: Don't wake rcuc/X kthreads on NOCB CPUs
Message-ID<sZsFc-49R-11@gated-at.bofh.it>
Chris Friesen notice that rcuc/X kthreads were consuming CPU even on
NOCB CPUs.  This makes no sense because the only purpose or these
kthreads is to invoke normal (non-offloaded) callbacks, of which there
will never be any on NOCB CPUs.  This problem was due to a bug in
cpu_has_callbacks_ready_to_invoke(), which should have been checking
->nxttail[RCU_NEXT_TAIL] for NULL, but which was instead (incorrectly)
checking ->nxttail[RCU_DONE_TAIL].  Because ->nxttail[RCU_DONE_TAIL] is
never NULL, the only effect is to cause the rcuc/X kthread to execute
when it should not do so.

This commit therefore checks ->nxttail[RCU_NEXT_TAIL], which is NULL
for NOCB CPUs.

Reported-by: Chris Friesen <chris.friesen@windriver.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 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 ed5a17aca281..cac80e08b353 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -611,7 +611,7 @@ static int
 cpu_has_callbacks_ready_to_invoke(struct rcu_data *rdp)
 {
 	return &rdp->nxtlist != rdp->nxttail[RCU_DONE_TAIL] &&
-	       rdp->nxttail[RCU_DONE_TAIL] != NULL;
+	       rdp->nxttail[RCU_NEXT_TAIL] != NULL;
 }
 
 /*
-- 
2.5.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web