From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934375AbbIVSyI (ORCPT ); Tue, 22 Sep 2015 14:54:08 -0400 Received: from mail-yk0-f182.google.com ([209.85.160.182]:34187 "EHLO mail-yk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759091AbbIVSyD (ORCPT ); Tue, 22 Sep 2015 14:54:03 -0400 Date: Tue, 22 Sep 2015 14:53:57 -0400 From: Tejun Heo To: Linus Torvalds Cc: Herbert Xu , David Miller , Cong Wang , tom@herbertland.com, kafai@fb.com, kernel-team@fb.com, Linux Kernel Mailing List , Network Development , =?utf-8?B?SmnFmcOtIFDDrXJrbw==?= , Nicolas Dichtel , Thomas Graf , Scott Feldman Subject: Re: [PATCH v2] netlink: Replace rhash_portid with bound Message-ID: <20150922185357.GD17659@mtj.duckdns.org> References: <20150918111650.GA7508@gondor.apana.org.au> <20150920.225521.1063980101511317898.davem@davemloft.net> <20150921060636.GA30807@gondor.apana.org.au> <20150920.231104.525285577747035896.davem@davemloft.net> <20150921133415.GA1740@gondor.apana.org.au> <20150921182022.GB13263@mtj.duckdns.org> <20150922033856.GA7851@gondor.apana.org.au> <20150922161056.GB9761@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Linus. On Tue, Sep 22, 2015 at 11:42:33AM -0700, Linus Torvalds wrote: ... > smp_rmb() should generally be about the same cost as an acquire. It > can go either way. > > So *if* the algorithm is amenable to smp_wmb()/smp_rmb() kind of > barriers, that's actually quite possibly better than acquire/release. I see. The write path here is cold so the competition is between rmb and acquire. Unless some significant archs completely screwed it up, acquire still seems like the better option. It's essentially free on x86 after all. Thanks. -- tejun