From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92E00E810DA for ; Wed, 27 Sep 2023 12:55:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231760AbjI0MzE (ORCPT ); Wed, 27 Sep 2023 08:55:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231773AbjI0MzE (ORCPT ); Wed, 27 Sep 2023 08:55:04 -0400 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E730612A for ; Wed, 27 Sep 2023 05:55:00 -0700 (PDT) Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.94.2) (envelope-from ) id 1qlU4A-00019r-Gq; Wed, 27 Sep 2023 14:54:58 +0200 Date: Wed, 27 Sep 2023 14:54:58 +0200 From: Phil Sutter To: Florian Westphal Cc: Pablo Neira Ayuso , netfilter-devel@vger.kernel.org Subject: Re: [nf PATCH 2/5] netfilter: nf_tables: Add locking for NFT_MSG_GETRULE_RESET requests Message-ID: Mail-Followup-To: Phil Sutter , Florian Westphal , Pablo Neira Ayuso , netfilter-devel@vger.kernel.org References: <20230923161813.GB19098@breakpoint.cc> <20230925195317.GC22532@breakpoint.cc> <20230927114133.GA17767@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230927114133.GA17767@breakpoint.cc> Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org On Wed, Sep 27, 2023 at 01:41:33PM +0200, Florian Westphal wrote: > Phil Sutter wrote: > > > However, this is stalling writers and I don't think we need this > > > according to the problem description. > > > > ACK. Maybe Florian has a case in mind which requires to serialize reset > > and commit? > > No, spinlock is fine too, concurrent resets will just burn more cycles. > I did not think we'd have frequent resets which is why I suggegested > reuse of the existing lock, thats all. > > No objections to new mutex or spinlock. OK, so we may just reuse commit_mutex until we find a practical use-case for which this is a bottleneck? Or should one prefer a dedicated lock in order to reduce complexity when it comes to lock debugging? Cheers, Phil