Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3904982img; Mon, 25 Mar 2019 22:04:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTB03CosrjJ+2os7GdRz8eQqxIPS8eUmYhTJJjkJEo8gX86OUXObUKh8FYXXcbJbmSOLbm X-Received: by 2002:a63:78ce:: with SMTP id t197mr13884858pgc.314.1553576698149; Mon, 25 Mar 2019 22:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553576698; cv=none; d=google.com; s=arc-20160816; b=DjxwIeRzXZVx1ZoOSIcM6Q7zl8TklLZBtVah5WbDmLMAtgl7pidqtXmefK3Kr6WKxj uj864XW/a5t3kVxZUrmHl/cnzkaYzucibScE4yihwCuLfi4tczOiE80m69oybOksi2d5 cc0jfv0l8X65YINLD0d7IHsvbqucfgXg52d1yncx7091Oebt1H7LWnmA5erMSjnJjD6k 2p7gVx6eEvfBTeErdK+7HubgH0Fo08K8z3yyQ7KC+3TQvRBhFFvIgsflnz7A+CKX6OWT 2p61KNADU78BTyQC21+Rp9HcYa23YdRZwWoBzwIMDXniEZraBCF6e9eKmrVlXr7taL+X arKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bl6rVwHW2hJ/zyj5alKuvFEzAG/b/fLEMUlYDQuyG68=; b=m+wjNX5mNaGuuu2erhORqaxI7JSvDklmlIk5I6NRDXD4Onm0mFl+iHEDZr+C8GuLYN T29d6vj5rYwNBeMAPaMr4+dUjVE0ZVqLC+zeYwwD+IDEclVg/kvo7pZIumtyEF/l67g2 /IekQJguUicmtJWpDgxdNs88VuK+uMjMktYomiejAG55XQODi6oTq7phS+qW/IvUmHo1 m6TxJfGJtEWOzjm5pxoD165LD2uML+OBDHgDHTfPBdHo5nDRl7tG7vgRm47BABos/S9h nY3X0jp+H6IRDvgCNkM6fP47wZjiuX0IKSy9gWzBKTEO+lm11IIlbQeVCu2xDzYbsp/y uzBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k30si15494881pgb.587.2019.03.25.22.04.41; Mon, 25 Mar 2019 22:04:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727624AbfCZFEA (ORCPT + 99 others); Tue, 26 Mar 2019 01:04:00 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:59040 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbfCZFEA (ORCPT ); Tue, 26 Mar 2019 01:04:00 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1h8eFh-0004xj-Q7; Tue, 26 Mar 2019 13:03:57 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1h8eF6-0001xE-IO; Tue, 26 Mar 2019 13:03:20 +0800 Date: Tue, 26 Mar 2019 13:03:20 +0800 From: Herbert Xu To: NeilBrown Cc: Thomas Graf , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Paul E. McKenney" Subject: Re: [PATCH 3/4] rhashtable: use bit_spin_locks to protect hash bucket. Message-ID: <20190326050320.gwk3tgtqwl5csivt@gondor.apana.org.au> References: <155349021177.1111.15681654355431465791.stgit@noble.brown> <155349033961.1111.18247269615646768227.stgit@noble.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <155349033961.1111.18247269615646768227.stgit@noble.brown> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 25, 2019 at 04:05:39PM +1100, NeilBrown wrote: > > + * Sometimes we unlock a bucket by writing a new pointer there. In that > + * case we don't need to unlock, but we do need to reset state such as > + * local_bh. For that we have rht_unlocked(). This doesn't include > + * the memory barrier that bit_spin_unlock() provides, but rcu_assign_pointer() > + * will have provided that. Hmm, are you sure that's enough? IIRC rcu_assign_pointer only provides a write barrier compared to the more complete (but one-way) barrier that a spin-lock provides. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt