From patchwork Tue Jan 14 23:19:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 1223121 X-Patchwork-Delegate: matthieu.baerts@tessares.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=strlen.de Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47y5yv68Rnz9sNx for ; Wed, 15 Jan 2020 10:20:07 +1100 (AEDT) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4750810097DBD; Tue, 14 Jan 2020 15:23:24 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a0a:51c0:0:12e:520::1; helo=chamillionaire.breakpoint.cc; envelope-from=fw@breakpoint.cc; receiver= Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2C58510097DB9 for ; Tue, 14 Jan 2020 15:23:23 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1irVTe-0000uT-74; Wed, 15 Jan 2020 00:20:02 +0100 From: Florian Westphal To: Cc: Florian Westphal Date: Wed, 15 Jan 2020 00:19:49 +0100 Message-Id: <20200114231949.20106-1-fw@strlen.de> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Message-ID-Hash: 6HNGNBYLN2JMYSJ2IRWWZ6EUWEKFDTD3 X-Message-ID-Hash: 6HNGNBYLN2JMYSJ2IRWWZ6EUWEKFDTD3 X-MailFrom: fw@breakpoint.cc X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH] subflow: remove unneded memory barriers List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: squashto: mptcp: Implement MPTCP receive path The bit set operation has no prior dependencies, so smp_mb__before_atomic() is not needed. It has no followup depenency: the woken task will always see the bit set, plus wakeup code (called via sk_data_ready) acquires a spinlock. Signed-off-by: Florian Westphal --- net/mptcp/subflow.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index abd97d1a8645..ae9173040f17 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -712,9 +712,7 @@ static void subflow_data_ready(struct sock *sk) } if (mptcp_subflow_data_available(sk)) { - smp_mb__before_atomic(); set_bit(MPTCP_DATA_READY, &mptcp_sk(parent)->flags); - smp_mb__after_atomic(); parent->sk_data_ready(parent); } @@ -869,9 +867,7 @@ static void subflow_state_change(struct sock *sk) * the data available machinery here. */ if (parent && subflow->mp_capable && mptcp_subflow_data_available(sk)) { - smp_mb__before_atomic(); set_bit(MPTCP_DATA_READY, &mptcp_sk(parent)->flags); - smp_mb__after_atomic(); parent->sk_data_ready(parent); }