rcu: Limit rcu_capacity[] size to RCU_NUM_LVLS items
authorAlexander Gordeev <agordeev@redhat.com>
Wed, 3 Jun 2015 06:18:28 +0000 (08:18 +0200)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 15 Jul 2015 21:45:18 +0000 (14:45 -0700)
commit05b84aec465c34da242a224d2438d192ca0feec7
tree4dc8cca8a45e4bea1eb40f71ad42c7325c6b6069
parenta6d77081e266605c9f4d8c11e0ee00468b9dc614
rcu: Limit rcu_capacity[] size to RCU_NUM_LVLS items

Number of items in rcu_capacity[] array is defined by macro
MAX_RCU_LVLS. However, that array is never accessed beyond
RCU_NUM_LVLS index. Therefore, we can limit the array to
RCU_NUM_LVLS items and eliminate MAX_RCU_LVLS. As result,
in most cases the memory is conserved.

Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c
kernel/rcu/tree.h