Hello, On Thu, Dec 20, 2018 at 08:04:08AM -0800, Paul E. McKenney wrote: > > Yes, it is possible. Just do something like this: > > > > struct srcu_struct my_srcu_struct; > > > > And before the first use of my_srcu_struct, do this: > > > > init_srcu_struct(&my_srcu_struct); > > > > This will result in alloc_percpu() being invoked to allocate the > > needed per-CPU space. > > > > If my_srcu_struct is used in a module or some such, then to avoid memory > > leaks, after the last use of my_srcu_struct, do this: > > > > cleanup_srcu_struct(&my_srcu_struct); > > > > There are several places in the kernel that take this approach. Oops, my bad. Somehow I thought the dynamic init didn't exist (I checked the header but somehow completely skipped over them). Thanks for the explanation! -- tejun