Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-19 Thread Frederic Weisbecker
On Fri, Mar 19, 2021 at 04:38:48PM -0700, Paul E. McKenney wrote: > > I didn't even think that far. > > My scenario was: > > > > 1. cookie = start_poll_synchronize_rcu() > > > > > > 2. cond_synchronize_rcu() checks the cookie and sees that the > > grace period has not yet expired. So it

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-19 Thread Paul E. McKenney
On Fri, Mar 19, 2021 at 11:10:40PM +0100, Frederic Weisbecker wrote: > On Fri, Mar 19, 2021 at 10:51:16AM -0700, Paul E. McKenney wrote: > > On Fri, Mar 19, 2021 at 02:58:54PM +0100, Frederic Weisbecker wrote: > > > It's all a matter of personal taste but if I may suggest some namespace > > >

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-19 Thread Frederic Weisbecker
On Fri, Mar 19, 2021 at 10:51:16AM -0700, Paul E. McKenney wrote: > On Fri, Mar 19, 2021 at 02:58:54PM +0100, Frederic Weisbecker wrote: > > It's all a matter of personal taste but if I may suggest some namespace > > modifications: > > > > get_state_synchronize_rcu() ->

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-19 Thread Paul E. McKenney
On Fri, Mar 19, 2021 at 02:58:54PM +0100, Frederic Weisbecker wrote: > On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > > From: "Paul E. McKenney" > > > > There is a need for a non-blocking polling interface for RCU grace > > periods, so this commit supplies

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-19 Thread Frederic Weisbecker
On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > From: "Paul E. McKenney" > > There is a need for a non-blocking polling interface for RCU grace > periods, so this commit supplies start_poll_synchronize_rcu() and > poll_state_synchronize_rcu() for this purpose. Note that

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-18 Thread Paul E. McKenney
On Thu, Mar 18, 2021 at 03:59:52PM +0100, Frederic Weisbecker wrote: > On Tue, Mar 16, 2021 at 09:51:01AM -0700, Paul E. McKenney wrote: > > On Tue, Mar 16, 2021 at 04:17:50PM +0100, Frederic Weisbecker wrote: > > > On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > > > > +/** >

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-18 Thread Frederic Weisbecker
On Tue, Mar 16, 2021 at 09:51:01AM -0700, Paul E. McKenney wrote: > On Tue, Mar 16, 2021 at 04:17:50PM +0100, Frederic Weisbecker wrote: > > On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > > > +/** > > > + * poll_state_synchronize_rcu - Conditionally wait for an RCU grace >

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-16 Thread Paul E. McKenney
On Tue, Mar 16, 2021 at 04:17:50PM +0100, Frederic Weisbecker wrote: > On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > > +/** > > + * poll_state_synchronize_rcu - Conditionally wait for an RCU grace period > > + * > > + * @oldstate: return from call to

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-16 Thread Paul E. McKenney
On Tue, Mar 16, 2021 at 03:47:22PM +0100, Frederic Weisbecker wrote: > On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > > +/** > > + * poll_state_synchronize_rcu - Conditionally wait for an RCU grace period > > + * > > + * @oldstate: return from call to

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-16 Thread Frederic Weisbecker
On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > +/** > + * poll_state_synchronize_rcu - Conditionally wait for an RCU grace period > + * > + * @oldstate: return from call to get_state_synchronize_rcu() or > start_poll_synchronize_rcu() > + * > + * If a full RCU grace period

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-16 Thread Frederic Weisbecker
On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > +/** > + * poll_state_synchronize_rcu - Conditionally wait for an RCU grace period > + * > + * @oldstate: return from call to get_state_synchronize_rcu() or > start_poll_synchronize_rcu() > + * > + * If a full RCU grace period

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-15 Thread Paul E. McKenney
On Fri, Mar 12, 2021 at 01:26:47PM +0100, Frederic Weisbecker wrote: > On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > > /** > > + * start_poll_state_synchronize_rcu - Snapshot and start RCU grace period > > + * > > + * Returns a cookie that is used by a later call to

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-12 Thread Frederic Weisbecker
On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > /** > + * start_poll_state_synchronize_rcu - Snapshot and start RCU grace period > + * > + * Returns a cookie that is used by a later call to cond_synchronize_rcu() > + * or poll_state_synchronize_rcu() to determine whether or

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-12 Thread Frederic Weisbecker
On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > From: "Paul E. McKenney" > > There is a need for a non-blocking polling interface for RCU grace > periods, so this commit supplies start_poll_synchronize_rcu() and > poll_state_synchronize_rcu() for this purpose. Note that

[PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-03 Thread paulmck
From: "Paul E. McKenney" There is a need for a non-blocking polling interface for RCU grace periods, so this commit supplies start_poll_synchronize_rcu() and poll_state_synchronize_rcu() for this purpose. Note that the existing get_state_synchronize_rcu() may be used if future grace periods are