Re: [PATCH 3/3] srcu: Fix broken node geometry after early ssp init

2021-04-02 Thread Paul E. McKenney
On Fri, Apr 02, 2021 at 10:50:38PM +0200, Frederic Weisbecker wrote: > On Fri, Apr 02, 2021 at 08:03:57AM -0700, Paul E. McKenney wrote: > > On Fri, Apr 02, 2021 at 12:02:21PM +0200, Frederic Weisbecker wrote: > > > Arguably that's a quite a corner case and I don't expect anyone to call > > >

Re: [PATCH 3/3] srcu: Fix broken node geometry after early ssp init

2021-04-02 Thread Frederic Weisbecker
On Fri, Apr 02, 2021 at 08:03:57AM -0700, Paul E. McKenney wrote: > On Fri, Apr 02, 2021 at 12:02:21PM +0200, Frederic Weisbecker wrote: > > Arguably that's a quite a corner case and I don't expect anyone to call > > start_poll_synchronize_srcu() so early but who knows. An alternative is to > >

Re: [PATCH 3/3] srcu: Fix broken node geometry after early ssp init

2021-04-02 Thread Paul E. McKenney
On Fri, Apr 02, 2021 at 12:02:21PM +0200, Frederic Weisbecker wrote: > On Thu, Apr 01, 2021 at 06:12:41PM -0700, Paul E. McKenney wrote: > > On Fri, Apr 02, 2021 at 01:47:04AM +0200, Frederic Weisbecker wrote: > gg> > void __init srcu_init(void) > > > { > > > - struct srcu_struct *ssp; > > > +

Re: [PATCH 3/3] srcu: Fix broken node geometry after early ssp init

2021-04-02 Thread Frederic Weisbecker
On Thu, Apr 01, 2021 at 06:12:41PM -0700, Paul E. McKenney wrote: > On Fri, Apr 02, 2021 at 01:47:04AM +0200, Frederic Weisbecker wrote: gg> > void __init srcu_init(void) > > { > > - struct srcu_struct *ssp; > > + static struct srcu_data __initdata old_sdp; > > + static struct srcu_node

Re: [PATCH 3/3] srcu: Fix broken node geometry after early ssp init

2021-04-01 Thread Paul E. McKenney
On Fri, Apr 02, 2021 at 01:47:04AM +0200, Frederic Weisbecker wrote: > An ssp initialized before rcu_init_geometry() will have its snp hierarchy > based on CONFIG_NR_CPUS. > > Once rcu_init_geometry() is called, the nodes distribution is shrinked > and optimized toward meeting the actual possible

[PATCH 3/3] srcu: Fix broken node geometry after early ssp init

2021-04-01 Thread Frederic Weisbecker
An ssp initialized before rcu_init_geometry() will have its snp hierarchy based on CONFIG_NR_CPUS. Once rcu_init_geometry() is called, the nodes distribution is shrinked and optimized toward meeting the actual possible number of CPUs detected on boot. Later on, the ssp that was initialized