srcu: Dynamically allocate srcu_node array
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 22 Jan 2022 00:13:52 +0000 (16:13 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 3 Feb 2022 22:05:57 +0000 (14:05 -0800)
commit010d3077d17bd865181a0bc04cb500ff29eda555
tree55cbbb0e374585cfdb64bb775fd90be00d682552
parent1a96a2501ad2f074f42efd3b09a5655d3c2dac3c
srcu: Dynamically allocate srcu_node array

This commit shrinks the srcu_struct structure by converting its ->node
field from a fixed-size compile-time array to a pointer to a dynamically
allocated array.  In kernels built with large values of NR_CPUS that boot
on systems with smaller numbers of CPUs, this can save significant memory.

[ paulmck: Apply kernel test robot feedback. ]

Reported-by: A cast of thousands
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/srcutree.h
kernel/rcu/srcutree.c