From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755587AbbCBQ6W (ORCPT ); Mon, 2 Mar 2015 11:58:22 -0500 Received: from e31.co.us.ibm.com ([32.97.110.149]:54669 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755538AbbCBQ6Q (ORCPT ); Mon, 2 Mar 2015 11:58:16 -0500 Date: Mon, 2 Mar 2015 08:58:12 -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: <20150302165811.GP15405@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <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> <20150228233203.GL15405@linux.vnet.ibm.com> <20150302092440.GF5029@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150302092440.GF5029@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: 15030216-8236-0000-0000-000009E0DE0F Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 02, 2015 at 10:24:40AM +0100, Peter Zijlstra wrote: > On Sat, Feb 28, 2015 at 03:32:03PM -0800, Paul E. McKenney wrote: > > Whew! > > > > Though otherwise whatever you were doing would have been pretty cool > > and fun to learn about. ;-) > > So I think I can do that; where readers and writers are fully separated, > but it requires: > > - tripple latch > - copy operator > - nested RCU > > And the result would be horribly expensive (mostly due to the copy > operator on dynamic data structures) on the update side, which severely > limits the applicability of the scheme. True enough, if you have a single pointer to an RCU-protected data structure, you can update anything in any way by doing a deep copy of the original, updating, and swapping pointers. And what is a little copy overhead among friends? ;-) Thanx, Paul