mbox series

[0/4,v2] rcu/nocb: Shrinker related boring fixes

Message ID 20230329160203.191380-1-frederic@kernel.org (mailing list archive)
Headers show
Series rcu/nocb: Shrinker related boring fixes | expand

Message

Frederic Weisbecker March 29, 2023, 4:01 p.m. UTC
Changes since v1 (https://lore.kernel.org/lkml/20230322194456.2331527-1-frederic@kernel.org/):

* Use mutex_trylock() to avoid inverted dependency chain against
  allocations.

* WARN if an rdp is part of nocb mask but is not offloaded

Tested through shrinker debugfs interface.

Frederic Weisbecker (4):
  rcu/nocb: Protect lazy shrinker against concurrent (de-)offloading
  rcu/nocb: Fix shrinker race against callback enqueuer
  rcu/nocb: Recheck lazy callbacks under the ->nocb_lock from shrinker
  rcu/nocb: Make shrinker to iterate only NOCB CPUs

 kernel/rcu/tree_nocb.h | 52 ++++++++++++++++++++++++++++++++++++++----
 1 file changed, 47 insertions(+), 5 deletions(-)

Comments

Paul E. McKenney April 24, 2023, 5:35 p.m. UTC | #1
On Wed, Mar 29, 2023 at 06:01:59PM +0200, Frederic Weisbecker wrote:
> Changes since v1 (https://lore.kernel.org/lkml/20230322194456.2331527-1-frederic@kernel.org/):
> 
> * Use mutex_trylock() to avoid inverted dependency chain against
>   allocations.
> 
> * WARN if an rdp is part of nocb mask but is not offloaded
> 
> Tested through shrinker debugfs interface.

I pulled this one in, thank you!

As discussed, we do need some way to test lazy callbacks, but that should
not block this series.  And it might well be a separate test.

							Thanx, Paul

> Frederic Weisbecker (4):
>   rcu/nocb: Protect lazy shrinker against concurrent (de-)offloading
>   rcu/nocb: Fix shrinker race against callback enqueuer
>   rcu/nocb: Recheck lazy callbacks under the ->nocb_lock from shrinker
>   rcu/nocb: Make shrinker to iterate only NOCB CPUs
> 
>  kernel/rcu/tree_nocb.h | 52 ++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 47 insertions(+), 5 deletions(-)
> 
> -- 
> 2.34.1
>