[PATCH] srcu: Debloat the <linux/rcu_segcblist.h> header
From: Ingo Molnar
Date: Tue May 02 2017 - 04:31:32 EST
* Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> > I will get rid of the unused rcu_segcblist_extract_all() function and create a
> > kernel/rcu/segcblist.c for the functions that are either non-trivial or
> > performance-insensitive.
> > Does that cover it, or am I missing something?
> I'd also suggest moving as much of the RCU internal data types into kernel/rcu/
> as possible. It's not clear to me which part of it is supposed to be a public
> API and which bits are internal. It might make sense to keep it internal for the
> time being, and only export things once there are users.
> I.e. a pretty good solution would be to move all of
> include/linux/rcu_segcblist.h to kernel/rcu/rcu_segcblist.c or so - and do a
> kernel/rcu/rcu_segcblist.h with the data types and function prototypes.
I.e. the attached patch as a first step.
Only minimally build tested, but it appears to be do the trick.
This changes the <linux/rcu_segcblist.h> header from ~700 lines to only 90 lines -
60% of which is comments.
The deinlining of the inline functions within kernel/rcu/ should also be done, as
a separate patch on top of this.
What do you think?
This could also be a model to factor out and deinline other bits of the RCU
machinery as much as possible.