Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753024AbbB1XcM (ORCPT ); Sat, 28 Feb 2015 18:32:12 -0500 Received: from e32.co.us.ibm.com ([32.97.110.150]:54177 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821AbbB1XcI (ORCPT ); Sat, 28 Feb 2015 18:32:08 -0500 Date: Sat, 28 Feb 2015 15:32:03 -0800 From: "Paul E. McKenney" To: Peter Zijlstra 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: <20150228233203.GL15405@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com 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> <20150228165654.GC24151@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150228165654.GC24151@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15022823-0005-0000-0000-0000092D14EF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 29 On Sat, Feb 28, 2015 at 05:56:54PM +0100, Peter Zijlstra wrote: > 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. Whew! Though otherwise whatever you were doing would have been pretty cool and fun to learn about. ;-) Thanx, Paul -- 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/