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>
Cc: ale.crismani@automattic.com, xiaolinkui@kylinos.cn,
	 "Pablo Neira Ayuso" <pablo@netfilter.org>,
	 linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re:Re: Performance regression in ip_set_swap on 6.1.69
Date: Thu, 11 Jan 2024 19:11:28 +0800 (CST)	[thread overview]
Message-ID: <7c8d2978.8451.18cf8384d73.Coremail.00107082@163.com> (raw)
In-Reply-To: <0d0b1526-6189-fd0f-747e-cb803936b20a@blackhole.kfki.hu>



At 2024-01-11 16:25:46, "Jozsef Kadlecsik" <kadlec@blackhole.kfki.hu> wrote:
>Hi,
>
>
>Could you check that the patch below fixes the performance regression? 
>Instead of waiting for the RCU grace period at swapping, call_rcu() is 
>used at destroying the set.

Got a compiler error:
net/netfilter/ipset/ip_set_core.c: In function ‘ip_set_destroy_set_rcu’:
net/netfilter/ipset/ip_set_core.c:1017:9: error: implicit declaration of function ‘ip_set_destroy_set’; did you mean ‘ip_set_destroy_set_rcu’? [-Werror=implicit-function-declaration]
 1017 |         ip_set_destroy_set(set);
      |         ^~~~~~~~~~~~~~~~~~
      |         ip_set_destroy_set_rcu
net/netfilter/ipset/ip_set_core.c: At top level:
net/netfilter/ipset/ip_set_core.c:1183:1: warning: conflicting types for ‘ip_set_destroy_set’; have ‘void(struct ip_set *)’
 1183 | ip_set_destroy_set(struct ip_set *set)
      | ^~~~~~~~~~~~~~~~~~
net/netfilter/ipset/ip_set_core.c:1183:1: error: static declaration of ‘ip_set_destroy_set’ follows non-static declaration


I move the declaration of ip_set_destroy_set_rcu,  make sure it is after the declaration of ip_set_destroy_set, 
With this path, the performance degradation of ipset_swap is gone,  but my test only stress ipset_swap, not a swap/destroy sequence.
I will adjust my  code to stress a full swap/destroy/create/add sequence, and update later.


Thanks
David

  reply	other threads:[~2024-01-11 11:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05 22:45 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 [this message]
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
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=7c8d2978.8451.18cf8384d73.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®