3cd12006bb
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
48 lines
1.9 KiB
Diff
48 lines
1.9 KiB
Diff
From dce89d8204b21fa1a93cb0a476750cd292617e79 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <dce89d8204b21fa1a93cb0a476750cd292617e79.1507237259.git.Jim.Somerville@windriver.com>
|
|
In-Reply-To: <2a9fb6a58e40e8604d97223603111e869bb774b1.1507237258.git.Jim.Somerville@windriver.com>
|
|
References: <2a9fb6a58e40e8604d97223603111e869bb774b1.1507237258.git.Jim.Somerville@windriver.com>
|
|
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
|
|
Date: Thu, 15 Dec 2016 15:37:47 -0800
|
|
Subject: [PATCH 16/24] rcu: Don't wake rcuc/X kthreads on NOCB CPUs
|
|
|
|
[ upstream 630c7ed9ca0608912fa7c8591d05dfc8742dc9e6 in tip repo ]
|
|
|
|
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>
|
|
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
|
|
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
|
---
|
|
kernel/rcutree.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
|
|
index f46e3e4..ac3dfb7 100644
|
|
--- a/kernel/rcutree.c
|
|
+++ b/kernel/rcutree.c
|
|
@@ -300,7 +300,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;
|
|
}
|
|
|
|
/*
|
|
--
|
|
1.8.3.1
|
|
|