Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1575869pxb; Mon, 8 Mar 2021 00:34:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJysEoYnFqHUF+nlza1ALAll4J9LLefmrEfOTCHQI422lhzpnnqNn5RxXGe5WQOBbkCMueiM X-Received: by 2002:aa7:d416:: with SMTP id z22mr20689406edq.239.1615192475009; Mon, 08 Mar 2021 00:34:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615192475; cv=none; d=google.com; s=arc-20160816; b=fAG5ghgpQatN9JsyzrakrIZZhowvbzLLdhzyUQhOPFfic54Jx/vEPoItW1XnYsgsS6 KqPSoumxEH4B99ixcyjK8OwM/LeBtorpdv18p/FJfGDuLh/7bsm13kxvyMHRExvdUfx7 /DOIsqr7XX4LKk76IOrgjm7jKbulkAXHH/Q1O1EYaxEhdSn/vY0wuLd8R3NVl6gP7v74 e3creID3xYEi9mtZmGBeHz6Omc8tyU4cn8ypkPluoILM0Kh19zBrVj654OYgLcT1TEtS Nb70nOoJRRTngbwl0HdMp7WAMxllIEvhvj2cFJ58TogYnbGpjfl9oki6wrDOJrDwsjME Gy2g== 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=ABabwrGZph5Afo5RyJHi6FSG681DtoXzWh8yvDMtmxY=; b=lUeYBC7NSXhNiKskEiHBmJMHYqrHdp1o7zW/LMCngMfQ/Rz8s4jGyf440M/GG3RcyO 9nSQhSvNls73YRDgQn04ACZed43YIO51BLhc4iqkPWw+2uOmeTaDzRaQ2c5fV90Zfs8Z Wv6p/Zx1SHEeZHruUm6VJJocwZ0tX8KFGFKe6/b6MDJmlllQ3G9C39GwIjxfDzGaLmo/ gJBMtH/3/Xp5rMr4ZCOq4Tugo9qQ04fEdWmZTmNmbdZ57BeaFs8SCGlsErJLYmjE8fm5 Oz0nAgQNpfnOhyDNSwGfdpNAmyBV/lCylm01rnmfnCsasMgMl77mmxPylx30kIYwHtrg +NgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=Ag879LDN; 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 z22si6758932edb.163.2021.03.08.00.34.12; Mon, 08 Mar 2021 00:34:34 -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=Ag879LDN; 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 S233512AbhCHBZM (ORCPT + 99 others); Sun, 7 Mar 2021 20:25:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232273AbhCHBYj (ORCPT ); Sun, 7 Mar 2021 20:24:39 -0500 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [IPv6:2001:df5:b000:5::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28156C06175F for ; Sun, 7 Mar 2021 17:24:39 -0800 (PST) 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 C5933891AE; Mon, 8 Mar 2021 14:24:34 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1615166674; bh=ABabwrGZph5Afo5RyJHi6FSG681DtoXzWh8yvDMtmxY=; h=From:To:Cc:Subject:Date; b=Ag879LDN87DRqRqwn2EjXNq2A3iwG787V1/fCaA4gc3OlUULBEpDXnMK7ygEEsNbZ Dh+FssSN/BKx8AUPo7sNU/zGV4EpSNLWn+yUibVVGzS+LsboieNXEVWd6LDM+LcvDX KHhYnC8V6dqEM88A9apY43HB3lp0b+aDH+Y18pcMebOu7oOE0do1tAaowUJwnqKXin l4TeRUSpVRjpBGwW9Qx2BcSihzIE5ED8HZHXA+uiNF5lhdGD+uMLrOnDqa4YAW9N97 dXliRjv4SxOezvBeCcZvSelNotF0ipYIU8RBtX8MD8HdA3kYmYdsjqd4wqhjMpbTVW dZkMIBeFmOtWw== Received: from smtp (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Mon, 08 Mar 2021 14:24:34 +1300 Received: from markto-dl.ws.atlnz.lc (markto-dl.ws.atlnz.lc [10.33.23.25]) by smtp (Postfix) with ESMTP id 8FD4713EEFA; Mon, 8 Mar 2021 14:24:46 +1300 (NZDT) Received: by markto-dl.ws.atlnz.lc (Postfix, from userid 1155) id 97505340F85; Mon, 8 Mar 2021 14:24:34 +1300 (NZDT) From: Mark Tomlinson To: pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de Cc: subashab@codeaurora.org, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Tomlinson Subject: [PATCH v2 0/3] Don't use RCU for x_tables synchronization Date: Mon, 8 Mar 2021 14:24:10 +1300 Message-Id: <20210308012413.14383-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(). changes in v2: - Update commit messages only 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