Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp892016rdd; Wed, 10 Jan 2024 02:43:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxANfKWxLwnibx2F9Nldb/4TuAYWxy1PlhN0k6BpwRJqSbcGbA5/qiowt0EAnqmHaPNIk8 X-Received: by 2002:a50:9b51:0:b0:557:5693:9931 with SMTP id a17-20020a509b51000000b0055756939931mr298036edj.5.1704883431252; Wed, 10 Jan 2024 02:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704883431; cv=none; d=google.com; s=arc-20160816; b=avxku7lGzQjHDoW7AnzV0/Cdo/nWxKNduh9BrXSA4lVymPu96mH5v1s/Vk33vQATn5 CwfqghE8nzNs5iPVk1/FC+2SNYzltR+Gxrcj4FIuaovGRzCo9WtSEET20mKJRhM4X5Sf jf4x7IpDJeU8jYOvQopoUuahGeH6c/f69Cr73O/TXIBsKkCxZB3zotu8VfzqsFh0awsR gwyZkbPF1TklkdEHIkA6tgbEP5wCIam1n2oMgLYGS6xPiuP6F2yyPUgNt38GQzWLDhn2 YZfKJbHvbUPYPGpzRPgXJbnZjj7IzKj5b7MZusucUk6egehkVTRB8lkx/PBjenapjk74 CEfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date; bh=rr3ifKmrO/JV4UhiVxB2qX/gXhHiy3421p/cvf59o3o=; fh=dUS19FjxAo9Zn2lYLhp9an3u4MCuniAIB7IK2Ivucvc=; b=zcFxOx6T+9zlwBksseASfuQbClhWenLmqhGWSc2mpLmTCHFDUkG7WjFRCxAopscoGv uiplTH5r4ijn2dJMv4SM1M0xngqdcLPcaVXpd1XHFsC4hIvEaPoRDxmT0m0hPy6LK/K2 5xx00Q+CONhxumTHZtkdBjXFWsvIPMtdXkcNzk5425Vhh5/LOM89iRYue/oO9ldbv6zt 2kBAqfjjW7TZfFra/V/mM5oJA2H4gcntvYL9wNbd61QQc7YT4+o7xDYs0ik+UfNC0FCS SbXWUWnNwwXKe3QgeNOAX4vaBmdXiAct1TJLcx4lkOBgRPqJBgzL+Xp0tiyNVXhF93eQ qIVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-22005-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22005-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q5-20020a50cc85000000b0055590da3330si1624694edi.623.2024.01.10.02.43.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:43:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22005-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-22005-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22005-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F3A361F25266 for ; Wed, 10 Jan 2024 10:43:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7DDB41205; Wed, 10 Jan 2024 10:43:42 +0000 (UTC) Received: from smtp-out.kfki.hu (smtp-out.kfki.hu [148.6.0.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5439340C04; Wed, 10 Jan 2024 10:43:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org Received: from localhost (localhost [127.0.0.1]) by smtp2.kfki.hu (Postfix) with ESMTP id 8270ECC02D2; Wed, 10 Jan 2024 11:35:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at smtp2.kfki.hu Received: from smtp2.kfki.hu ([127.0.0.1]) by localhost (smtp2.kfki.hu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP; Wed, 10 Jan 2024 11:35:03 +0100 (CET) Received: from blackhole.kfki.hu (blackhole.szhk.kfki.hu [148.6.240.2]) by smtp2.kfki.hu (Postfix) with ESMTP id 1B3FCCC02D1; Wed, 10 Jan 2024 11:35:02 +0100 (CET) Received: by blackhole.kfki.hu (Postfix, from userid 1000) id 148BA343167; Wed, 10 Jan 2024 11:35:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by blackhole.kfki.hu (Postfix) with ESMTP id 12BD3343166; Wed, 10 Jan 2024 11:35:02 +0100 (CET) Date: Wed, 10 Jan 2024 11:35:02 +0100 (CET) From: Jozsef Kadlecsik To: David Wang <00107082@163.com> cc: ale.crismani@automattic.com, xiaolinkui@kylinos.cn, pablo@netfilter.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org Subject: Re: Performance regression in ip_set_swap on 6.1.69 In-Reply-To: <20240110102342.4978-1-00107082@163.com> Message-ID: References: <20240110102342.4978-1-00107082@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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@blackhole.kfki.hu, kadlecsik.jozsef@wigner.hu PGP key : https://wigner.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics H-1525 Budapest 114, POB. 49, Hungary