srcu: Begin offloading srcu_struct fields to srcu_update
The current srcu_struct structure is on the order of 200 bytes in size
(depending on architecture and .config), which is much better than the
old-style 26K bytes, but still all too inconvenient when one is trying
to achieve good cache locality on a fastpath involving SRCU readers.
However, only a few fields in srcu_struct are used by SRCU readers.
The remaining fields could be offloaded to a new srcu_update structure,
thus shrinking the srcu_struct structure down to a few tens of bytes.
This commit begins this noble quest, a quest that is complicated by
open-coded initialization of the srcu_struct within the srcu_notifier_head
structure and by the fact that modules don't like large quantities of
statically allocated per-CPU data.
The first complication is addressed by updating the srcu_notifier_head
structure's open coding, given that there does not appear to be a
straightforward way of abstracting that initialization. The second
complication is addressed by switching the CONFIG_MODULES initialization
to rely more heavily on compile-time initialization.
This commit moves only the ->node pointer to srcu_update. Later commits
will move additional fields.
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
5 files changed