Re: Performance regression in ip_set_swap on 6.1.69

From: Jozsef Kadlecsik
Date: Wed Jan 10 2024 - 05:43:51 EST


On Wed, 10 Jan 2024, David Wang wrote:

> I confirmed this on 6.7 that this was introduced by commit
> 28628fa952fefc7f2072ce6e8016968cc452b1ba with following changes:
>
> static inline void
> @@ -1397,6 +1394,9 @@ static int ip_set_swap(struct sk_buff *skb, const struct nfnl_info *info,
> ip_set(inst, to_id) = from;
> write_unlock_bh(&ip_set_ref_lock);
>
> + /* Make sure all readers of the old set pointers are completed. */
> + synchronize_rcu();
> +
> return 0;
> }
>
> synchronize_rcu causes the delay, and its usage here is very confusing,
> there is no reclaimer code after it.

As I'm seeing just the end of the discussion, please send a full report of
the problem and how to reproduce it.

Best regards,
Jozsef
--
E-mail : kadlec@xxxxxxxxxxxxxxxxx, kadlecsik.jozsef@xxxxxxxxx
PGP key : https://wigner.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics
H-1525 Budapest 114, POB. 49, Hungary