summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney2018-04-19 01:50:31 +0200
committerPaul E. McKenney2018-05-15 19:29:46 +0200
commit6f576e281690316270275bbef17c79ea304ad511 (patch)
tree1fadd183897a95f649974c04b8799f46c79454ac /kernel/rcu/tree.c
parentrcu: Make rcu_future_needs_gp() check all ->need_future_gps[] elements (diff)
downloadkernel-qcow2-linux-6f576e281690316270275bbef17c79ea304ad511.tar.gz
kernel-qcow2-linux-6f576e281690316270275bbef17c79ea304ad511.tar.xz
kernel-qcow2-linux-6f576e281690316270275bbef17c79ea304ad511.zip
rcu: Convert ->need_future_gp[] array to boolean
There is no longer any need for ->need_future_gp[] to count the number of requests for future grace periods, so this commit converts the additions to assignments to "true" and reduces the size of each element to one byte. While we are in the area, fix an obsolete comment. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index b05ab6379562..6ef1f2b4a6d3 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1709,7 +1709,7 @@ rcu_start_future_gp(struct rcu_node *rnp, struct rcu_data *rdp,
* current grace period, we don't need to explicitly start one.
*/
if (rnp->gpnum != rnp->completed) {
- need_future_gp_element(rnp, c)++;
+ need_future_gp_element(rnp, c) = true;
trace_rcu_future_gp(rnp, rdp, c, TPS("Startedleaf"));
goto out;
}
@@ -1741,7 +1741,7 @@ rcu_start_future_gp(struct rcu_node *rnp, struct rcu_data *rdp,
}
/* Record the need for the future grace period. */
- need_future_gp_element(rnp_root, c)++;
+ need_future_gp_element(rnp_root, c) = true;
/* If a grace period is not already in progress, start one. */
if (rnp_root->gpnum != rnp_root->completed) {
@@ -1769,7 +1769,7 @@ static bool rcu_future_gp_cleanup(struct rcu_state *rsp, struct rcu_node *rnp)
bool needmore;
struct rcu_data *rdp = this_cpu_ptr(rsp->rda);
- need_future_gp_element(rnp, c) = 0;
+ need_future_gp_element(rnp, c) = false;
needmore = need_any_future_gp(rnp);
trace_rcu_future_gp(rnp, rdp, c,
needmore ? TPS("CleanupMore") : TPS("Cleanup"));