Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752253AbbB1Q5E (ORCPT ); Sat, 28 Feb 2015 11:57:04 -0500 Received: from casper.infradead.org ([85.118.1.10]:40761 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750986AbbB1Q5B (ORCPT ); Sat, 28 Feb 2015 11:57:01 -0500 Date: Sat, 28 Feb 2015 17:56:54 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Mathieu Desnoyers , Andi Kleen , Andi Kleen , x86@kernel.org, linux-kernel@vger.kernel.org, oleg@redhat.com, rusty@rustcorp.com.au, mingo@kernel.org Subject: Re: [RFC][PATCH] module: Optimize __module_address() using a latched RB-tree Message-ID: <20150228165654.GC24151@twins.programming.kicks-ass.net> References: <1424482737-958-1-git-send-email-andi@firstfloor.org> <20150223170436.GC5029@twins.programming.kicks-ass.net> <20150223174340.GD27767@tassilo.jf.intel.com> <20150226114309.GR21418@twins.programming.kicks-ass.net> <2127583772.183982.1424966563927.JavaMail.zimbra@efficios.com> <20150226164356.GU21418@twins.programming.kicks-ass.net> <20150226182817.GY15405@linux.vnet.ibm.com> <20150226191335.GY21418@twins.programming.kicks-ass.net> <20150228164112.GB24151@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150228164112.GB24151@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 824 Lines: 20 On Sat, Feb 28, 2015 at 05:41:12PM +0100, Peter Zijlstra wrote: > > > > + rb_link_node(&mn->node, parent, link); > > > > > > This makes the new module visible to readers, if I understand correctly. > > > > You do. > > I think I have reconsidered; this does not in fact make it visible. Ah; never mind, it is. An iterator could have started in data[0], gone on holiday while the modification took place, and resumed once it is done and magically see the element appear. Therefore we do indeed need the atomic publishing and I think this also settles my question about Alpha. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/