Re: [PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case

2024-03-08 Thread Joel Fernandes
On 3/8/2024 4:52 PM, Paul E. McKenney wrote: > On Fri, Mar 08, 2024 at 06:38:37PM +0100, Uladzislau Rezki wrote: >> On Fri, Mar 08, 2024 at 04:05:15PM +0100, Uladzislau Rezki wrote: >>> On Thu, Mar 07, 2024 at 04:06:06PM -0800, Paul E. McKenney wrote: On Thu, Mar 07, 2024 at 06:52:14PM -050

Re: [PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case

2024-03-08 Thread Frederic Weisbecker
Le Thu, Mar 07, 2024 at 06:48:51PM -0500, Joel Fernandes (Google) a écrit : > In the synchronize_rcu() common case, we will have less than > SR_MAX_USERS_WAKE_FROM_GP number of users per GP. Waking up the kworker > is pointless just to free the last injected wait head since at that point, > all the

Re: [PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case

2024-03-08 Thread Paul E. McKenney
On Fri, Mar 08, 2024 at 06:38:37PM +0100, Uladzislau Rezki wrote: > On Fri, Mar 08, 2024 at 04:05:15PM +0100, Uladzislau Rezki wrote: > > On Thu, Mar 07, 2024 at 04:06:06PM -0800, Paul E. McKenney wrote: > > > On Thu, Mar 07, 2024 at 06:52:14PM -0500, Joel Fernandes wrote: > > > > On Thu, Mar 7, 20

Re: [PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case

2024-03-08 Thread Uladzislau Rezki
On Fri, Mar 08, 2024 at 04:05:15PM +0100, Uladzislau Rezki wrote: > On Thu, Mar 07, 2024 at 04:06:06PM -0800, Paul E. McKenney wrote: > > On Thu, Mar 07, 2024 at 06:52:14PM -0500, Joel Fernandes wrote: > > > On Thu, Mar 7, 2024 at 6:48 PM Joel Fernandes (Google) > > > wrote: > > > > > > > > In the

Re: [PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case

2024-03-08 Thread Uladzislau Rezki
On Thu, Mar 07, 2024 at 04:06:06PM -0800, Paul E. McKenney wrote: > On Thu, Mar 07, 2024 at 06:52:14PM -0500, Joel Fernandes wrote: > > On Thu, Mar 7, 2024 at 6:48 PM Joel Fernandes (Google) > > wrote: > > > > > > In the synchronize_rcu() common case, we will have less than > > > SR_MAX_USERS_WAKE

Re: [PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case

2024-03-07 Thread Paul E. McKenney
On Thu, Mar 07, 2024 at 06:52:14PM -0500, Joel Fernandes wrote: > On Thu, Mar 7, 2024 at 6:48 PM Joel Fernandes (Google) > wrote: > > > > In the synchronize_rcu() common case, we will have less than > > SR_MAX_USERS_WAKE_FROM_GP number of users per GP. Waking up the kworker > > is pointless just t

Re: [PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case

2024-03-07 Thread Joel Fernandes
On Thu, Mar 7, 2024 at 6:48 PM Joel Fernandes (Google) wrote: > > In the synchronize_rcu() common case, we will have less than > SR_MAX_USERS_WAKE_FROM_GP number of users per GP. Waking up the kworker > is pointless just to free the last injected wait head since at that point, > all the users have

[PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case

2024-03-07 Thread Joel Fernandes (Google)
In the synchronize_rcu() common case, we will have less than SR_MAX_USERS_WAKE_FROM_GP number of users per GP. Waking up the kworker is pointless just to free the last injected wait head since at that point, all the users have already been awakened. Introduce a new counter to track this and preven