]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Mon, 11 Apr 2022 22:31:02 +0000 (15:31 -0700)
commit263c35402ea3b00764bf37a2e5807a69d434c05d
treea3ac6e016db1e5e868f94859170e32f50b05dbd8
parentb935b24636d7a1db6501c567966998924bcf415e
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
Co-developed-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Signed-off-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/srcutree.h
kernel/rcu/srcutree.c