Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-06-11 Thread Paul E. McKenney
On Wed, Jun 10, 2020 at 09:32:03PM -0400, Joel Fernandes wrote: > On Thu, Jun 04, 2020 at 03:10:30PM +0200, Frederic Weisbecker wrote: > > On Tue, May 26, 2020 at 06:49:08PM -0400, Joel Fernandes wrote: > > > On Tue, May 26, 2020 at 05:20:17PM -0400, Joel Fernandes wrote: > > > > > > > > The

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-06-10 Thread Joel Fernandes
On Thu, Jun 04, 2020 at 03:10:30PM +0200, Frederic Weisbecker wrote: > On Tue, May 26, 2020 at 06:49:08PM -0400, Joel Fernandes wrote: > > On Tue, May 26, 2020 at 05:20:17PM -0400, Joel Fernandes wrote: > > > > > > The switch happens on the target with IRQs disabled and rdp->nocb_lock > > > >

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-06-04 Thread Frederic Weisbecker
On Tue, May 26, 2020 at 05:20:17PM -0400, Joel Fernandes wrote: > On Wed, May 13, 2020 at 06:47:12PM +0200, Frederic Weisbecker wrote: > > Allow a CPU's rdp to quit the callback offlined mode. > > nit: s/offlined/offloaded/ ? Oh, looks like I did that everywhere :) > > > The switch happens on

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-06-04 Thread Frederic Weisbecker
On Tue, May 26, 2020 at 06:49:08PM -0400, Joel Fernandes wrote: > On Tue, May 26, 2020 at 05:20:17PM -0400, Joel Fernandes wrote: > > > > The switch happens on the target with IRQs disabled and rdp->nocb_lock > > > held to avoid races between local callbacks handling and kthread > > > offloaded

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-26 Thread Joel Fernandes
On Tue, May 26, 2020 at 05:20:17PM -0400, Joel Fernandes wrote: > > The switch happens on the target with IRQs disabled and rdp->nocb_lock > > held to avoid races between local callbacks handling and kthread > > offloaded callbacks handling. > > nocb_cb kthread is first parked to avoid any

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-26 Thread Joel Fernandes
On Wed, May 13, 2020 at 06:47:12PM +0200, Frederic Weisbecker wrote: > Allow a CPU's rdp to quit the callback offlined mode. nit: s/offlined/offloaded/ ? > The switch happens on the target with IRQs disabled and rdp->nocb_lock > held to avoid races between local callbacks handling and kthread >

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-14 Thread Frederic Weisbecker
On Thu, May 14, 2020 at 03:47:35PM -0700, Paul E. McKenney wrote: > On Fri, May 15, 2020 at 12:30:23AM +0200, Frederic Weisbecker wrote: > > On Thu, May 14, 2020 at 08:47:07AM -0700, Paul E. McKenney wrote: > > > On Thu, May 14, 2020 at 12:45:26AM +0200, Frederic Weisbecker wrote: > > > This last

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-14 Thread Paul E. McKenney
On Fri, May 15, 2020 at 12:30:23AM +0200, Frederic Weisbecker wrote: > On Thu, May 14, 2020 at 08:47:07AM -0700, Paul E. McKenney wrote: > > On Thu, May 14, 2020 at 12:45:26AM +0200, Frederic Weisbecker wrote: > > This last seems best to me. The transition from CBLIST_NOT_OFFLOADED > > to

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-14 Thread Frederic Weisbecker
On Thu, May 14, 2020 at 08:47:07AM -0700, Paul E. McKenney wrote: > On Thu, May 14, 2020 at 12:45:26AM +0200, Frederic Weisbecker wrote: > This last seems best to me. The transition from CBLIST_NOT_OFFLOADED > to CBLIST_OFFLOADING of course needs to be on the CPU in question with > at least bh

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-14 Thread Paul E. McKenney
On Thu, May 14, 2020 at 12:45:26AM +0200, Frederic Weisbecker wrote: > On Wed, May 13, 2020 at 11:38:31AM -0700, Paul E. McKenney wrote: > > On Wed, May 13, 2020 at 06:47:12PM +0200, Frederic Weisbecker wrote: > > > +static void __rcu_nocb_rdp_deoffload(struct rcu_data *rdp) > > > +{ > > > +

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-13 Thread Frederic Weisbecker
On Wed, May 13, 2020 at 11:38:31AM -0700, Paul E. McKenney wrote: > On Wed, May 13, 2020 at 06:47:12PM +0200, Frederic Weisbecker wrote: > > +static void __rcu_nocb_rdp_deoffload(struct rcu_data *rdp) > > +{ > > + unsigned long flags; > > + struct rcu_node *rnp = rdp->mynode; > > + > > +

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-13 Thread Paul E. McKenney
On Wed, May 13, 2020 at 06:47:12PM +0200, Frederic Weisbecker wrote: > Allow a CPU's rdp to quit the callback offlined mode. > The switch happens on the target with IRQs disabled and rdp->nocb_lock > held to avoid races between local callbacks handling and kthread > offloaded callbacks handling. >

[PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-13 Thread Frederic Weisbecker
Allow a CPU's rdp to quit the callback offlined mode. The switch happens on the target with IRQs disabled and rdp->nocb_lock held to avoid races between local callbacks handling and kthread offloaded callbacks handling. nocb_cb kthread is first parked to avoid any future race with concurrent