mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Wang" <00107082@163.com>
To: "Jozsef Kadlecsik" <kadlec@blackhole.kfki.hu>,
	ale.crismani@automattic.com
Cc: linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org,
	 "Pablo Neira Ayuso" <pablo@netfilter.org>,
	xiaolinkui@kylinos.cn
Subject: Re:Performance regression in ip_set_swap on 6.7.0
Date: Sun, 14 Jan 2024 13:30:37 +0800 (CST)	[thread overview]
Message-ID: <41662e12.d59.18d0673507e.Coremail.00107082@163.com> (raw)
In-Reply-To: <d5c24887-b2d4-bcc-f5a4-bd3d2670d16@blackhole.kfki.hu>


At 2024-01-14 02:24:07, "Jozsef Kadlecsik" <kadlec@blackhole.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@automattic.com's original issue.



Thanks~
David

  reply	other threads:[~2024-01-14  5:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05 22:45 Performance regression in ip_set_swap on 6.1.69 Ale Crismani
2024-01-10 10:23 ` David Wang
2024-01-10 10:35   ` Jozsef Kadlecsik
2024-01-10 11:05     ` David Wang
2024-01-10 11:30       ` David Wang
2024-01-10 16:14       ` Jozsef Kadlecsik
2024-01-11  8:25         ` Jozsef Kadlecsik
2024-01-11 11:11           ` David Wang
2024-01-11 11:22             ` Jozsef Kadlecsik
2024-01-11 14:53               ` Re:Performance regression in ip_set_swap on 6.7.0 David Wang
2024-01-13 18:24                 ` Jozsef Kadlecsik
2024-01-14  5:30                   ` David Wang [this message]
2024-01-14 20:38                     ` Performance " Ale Crismani
2024-01-15 13:29                       ` Ale Crismani
2024-01-16  7:57                         ` Jozsef Kadlecsik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41662e12.d59.18d0673507e.Coremail.00107082@163.com \
    --to=00107082@163.com \
    --cc=ale.crismani@automattic.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=xiaolinkui@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®