[PATCH 10/10] rcu: Remove unnecessary grpnum field from rcu_node structure
From: Alexander Gordeev
Date: Mon Mar 09 2015 - 04:34:44 EST
Field rcu_node::grpnum is used to set rcu_node::grpmask at init
and never accessed afterwards. There is no reason to have it.
Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
---
kernel/rcu/tree.c | 5 ++---
kernel/rcu/tree.h | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 1cc1286..6afcf8f 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3963,12 +3963,11 @@ static void __init rcu_init_one(struct rcu_state *rsp,
if (rnp->grphi >= nr_cpu_ids)
rnp->grphi = nr_cpu_ids - 1;
if (i == 0) {
- rnp->grpnum = 0;
rnp->grpmask = 0;
rnp->parent = NULL;
} else {
- rnp->grpnum = j % levelspread[i - 1];
- rnp->grpmask = 1UL << rnp->grpnum;
+ int grpnum = j % levelspread[i - 1];
+ rnp->grpmask = 1UL << grpnum;
rnp->parent = rsp->level[i - 1] +
j / levelspread[i - 1];
}
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index f12fe83..bd66e85 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -151,8 +151,7 @@ struct rcu_node {
/* Only one bit will be set in this mask. */
int grplo; /* lowest-numbered CPU or group here. */
int grphi; /* highest-numbered CPU or group here. */
- u8 grpnum; /* CPU/group number for next level up. */
- u8 level; /* root is at level 0. */
+ int level; /* root is at level 0. */
bool wait_blkd_tasks;/* Necessary to wait for blocked tasks to */
/* exit RCU read-side critical sections */
/* before propagating offline up the */
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/