lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 16 Jan 2024 08:57:23 +0100 (CET)
From: Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
To: Ale Crismani <ale.crismani@...omattic.com>
cc: Wang David <00107082@....com>, linux-kernel@...r.kernel.org, 
    netfilter-devel@...r.kernel.org, Ayuso Pablo Neira <pablo@...filter.org>, 
    xiaolinkui@...inos.cn
Subject: Re: Performance regression in ip_set_swap on 6.7.0

On Mon, 15 Jan 2024, Ale Crismani wrote:

> > Il giorno 14 gen 2024, alle ore 21:38, Ale Crismani <ale.crismani@...omattic.com> ha scritto:
> > 
> >> Il giorno 14 gen 2024, alle ore 06:30, David Wang <00107082@....com> ha scritto:
> >> 
> >> 
> >> At 2024-01-14 02:24:07, "Jozsef Kadlecsik" <kadlec@...ckhole.kfki.hu> wrote:
> >>> On Thu, 11 Jan 2024, David Wang wrote:
> >>> 
> >>>> I tested the patch with code stressing swap->destroy->create->add 10000 
> >>>> times, the performance regression still happens, and now it is 
> >>>> ip_set_destroy. (I pasted the test code at the end of this mail)
> >> 
> >>>> 
> >>>> They all call wait_for_completion, which may sleep on something on 
> >>>> purpose, I guess...
> >>> 
> >>> That's OK because ip_set_destroy() calls rcu_barrier() which is needed to 
> >>> handle flush in list type of sets.
> >>> 
> >>> However, rcu_barrier() with call_rcu() together makes multiple destroys 
> >>> one after another slow. But rcu_barrier() is needed for list type of sets 
> >>> only and that can be handled separately. So could you test the patch 
> >>> below? According to my tests it is even a little bit faster than the 
> >>> original code before synchronize_rcu() was added to swap.
> >> 
> >> Confirmed~! This patch does fix the performance regression in my case.
> >> 
> >> Hope it can fix ale.crismani@...omattic.com's original issue.
> > 
> > Thanks for all the help on this, I'll try the patch tomorrow hopefully 
> > and will report back!
> 
> I applied the patch on 6.1.y on top of 875ee3a and I can confirm it 
> fixes the performance issues in our case too.

Thanks for the testing, to both of you. I'm going to release the patch 
for kernel inclusion.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ