From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiaozhou Liu Subject: Re: [PATCH net] soreuseport: use RCU_INIT_POINTER() when NULLing Date: Thu, 13 Dec 2018 11:35:32 +0800 Message-ID: <20181213033526.athxdsztxsknebhs@bogon> References: <20181212095812.27541-1-liuxiaozhou@bytedance.com> <116312bb-3891-b387-1fab-99ae7c61c0cb@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, "David S. Miller" To: Eric Dumazet Return-path: Received: from mail-pl1-f196.google.com ([209.85.214.196]:38432 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbeLMDfh (ORCPT ); Wed, 12 Dec 2018 22:35:37 -0500 Received: by mail-pl1-f196.google.com with SMTP id e5so358393plb.5 for ; Wed, 12 Dec 2018 19:35:37 -0800 (PST) Content-Disposition: inline In-Reply-To: <116312bb-3891-b387-1fab-99ae7c61c0cb@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Dec 12, 2018 at 05:08:45AM -0800, Eric Dumazet wrote: > > It is _not_ faster. > > Just different ways to do the exact same thing. > > For some reason you missed this two years old commit : > > > commit 3a37f7275cda5ad25c1fe9be8f20c76c60d175fa > Author: Paul E. McKenney > Date: Sun May 1 18:46:54 2016 -0700 > > rcu: No ordering for rcu_assign_pointer() of NULL > > This commit does a compile-time check for rcu_assign_pointer() of NULL, > and uses WRITE_ONCE() rather than smp_store_release() in that case. > > Reported-by: Christoph Hellwig > Signed-off-by: Paul E. McKenney Thanks for pointing this out. I guess the comments in include/linux/rcupdate.h may need some updating. Xiaozhou