Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1218660pxb; Thu, 4 Mar 2021 06:25:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+2TmhywPMEscseDN7f8k1OcuzDcTBZEAg+kJQkv1x2x2wnN3BZOFxu9OjZxRRUvIFzQBD X-Received: by 2002:aa7:c6d2:: with SMTP id b18mr4550592eds.183.1614867899832; Thu, 04 Mar 2021 06:24:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614867899; cv=none; d=google.com; s=arc-20160816; b=YgG3CX1VRk9WlhSa5tDV5zegYLFaElt0rEfFKcYOd+Lym8ciZHUyzc5LGusO5g1UxE Pe766IA1t51/3wU8tNdWjdviOm0YA7pFpKyWbIX9eeQ4S4vileD8dL+qs0xxSvVnrVAb 57adxc061aEdpFOK2LnOzlKRJ1u+YZ6udSUbABPsgvePpz1Y7V+NzoWlj6RtVenai4Mj 0P5wnBYqATSuzwnPTTcKTdyV8WKCE62TdIU6IFr8sSbVC3in6dbFIvHHfHzr4+0m3JiX 2kPozJLklNGEM7Cn1BMCWcunHfHukTgfeTNEEyF3Pe1TluikHsfy1dJg0CkKe6ktKTKd LdPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=u4+Fjwsj0Z1uMCnhK7LMLILdZ6fNqNEsV+VxNoMMz08=; b=B2to0tpluhvvtxlKuipj4AzNV1DFLjhs/IAyh54/Shak6Ww1voB4Hfq2mreZ+i6PHm Ghstr6Kw6NQfrofWkOZ8+v3g9kfH1Hm1pJ4ljrNAKRBgsh8dMLPguGIVA79izkV/3k4V 26XglHLCq0/RXu2Kt2WzjKBgVC9Z9Xvw2asy2zFmUdrAmgPSZIEEkyW8KzDYLPShiewQ p6B7CmSUa61IEjYoVMVpmbySouYv6Xv+LNFkV7pptfLVPDbavFa+23bQ381A6qiJveZB r/nsk9f4q4gCZiZPjoRxgU7Mee3ft3EQeUCbNzmOhA1gd1N4PHlZfIzsAqV/VRpaZph3 VTKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=vC5+5NRl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs11si6103448ejc.587.2021.03.04.06.24.35; Thu, 04 Mar 2021 06:24:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=vC5+5NRl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbhCDBcm (ORCPT + 99 others); Wed, 3 Mar 2021 20:32:42 -0500 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:41470 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbhCDBcj (ORCPT ); Wed, 3 Mar 2021 20:32:39 -0500 Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 60CDF806B7; Thu, 4 Mar 2021 14:31:57 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1614821517; bh=u4+Fjwsj0Z1uMCnhK7LMLILdZ6fNqNEsV+VxNoMMz08=; h=From:To:Cc:Subject:Date; b=vC5+5NRlE8pUiVTf5N7T6l0PZv49PNJUFCChsTzZplC7QSnzs56HCScLz4w1L+Q97 Mo1JM8QlKdZGcX77bquMRMzkc3YwI/cRS8MxI3Nwule3DBG8fNwnck0jbAVJk+CSMh RcySMJhRep1sUIc6uD8pr0IT4ylh2bTaHzaMQzCWPoWIpoHWkb8PIJWX9a1EG3Bsjm SqHcebKpTItcXBBQq9nH1pCggqZRquaMV3cU54wcZSbbHB5+yeFkndqutuJPiy7/3D IviqHnD0fRoY24THt9GiKAGbtoBhHAS7ghIvQPvqCHUAZ9magl7+QBFX5KPkNGUFyk JN2V2UFjlwNZQ== Received: from smtp (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Thu, 04 Mar 2021 14:31:57 +1300 Received: from markto-dl.ws.atlnz.lc (markto-dl.ws.atlnz.lc [10.33.23.25]) by smtp (Postfix) with ESMTP id 5BC4813EECD; Thu, 4 Mar 2021 14:32:08 +1300 (NZDT) Received: by markto-dl.ws.atlnz.lc (Postfix, from userid 1155) id 39ABE341002; Thu, 4 Mar 2021 14:31:57 +1300 (NZDT) From: Mark Tomlinson To: pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de Cc: netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Tomlinson Subject: [PATCH 0/3] Don't use RCU for x_tables synchronization Date: Thu, 4 Mar 2021 14:31:13 +1300 Message-Id: <20210304013116.8420-1-mark.tomlinson@alliedtelesis.co.nz> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.3 cv=C7uXNjH+ c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=dESyimp9J3IA:10 a=VwQbUJbxAAAA:8 a=LRamHRUzJ3vSQRNnU0gA:9 a=AjGcO6oz07-iQ99wixmX:22 a=BPzZvq435JnGatEyYwdK:22 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patches to change to using RCU synchronization in x_tables cause updating tables to be slowed down by an order of magnitude. This has been tried before, see https://lore.kernel.org/patchwork/patch/151796/ and ultimately was rejected. As mentioned in the patch description, a different method can be used to ensure ordering of reads/writes. This can simply be done by changing from smp_wmb() to smp_mb(). Mark Tomlinson (3): Revert "netfilter: x_tables: Update remaining dereference to RCU" Revert "netfilter: x_tables: Switch synchronization to RCU" netfilter: x_tables: Use correct memory barriers. include/linux/netfilter/x_tables.h | 7 ++--- net/ipv4/netfilter/arp_tables.c | 16 +++++----- net/ipv4/netfilter/ip_tables.c | 16 +++++----- net/ipv6/netfilter/ip6_tables.c | 16 +++++----- net/netfilter/x_tables.c | 49 +++++++++++++++++++++--------- 5 files changed, 60 insertions(+), 44 deletions(-) --=20 2.30.1