Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755351AbbDNNAz (ORCPT ); Tue, 14 Apr 2015 09:00:55 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:33245 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753620AbbDNNAq (ORCPT ); Tue, 14 Apr 2015 09:00:46 -0400 Date: Tue, 14 Apr 2015 15:00:41 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: rusty@rustcorp.com.au, mathieu.desnoyers@efficios.com, oleg@redhat.com, paulmck@linux.vnet.ibm.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, andi@firstfloor.org, rostedt@goodmis.org, tglx@linutronix.de, laijs@cn.fujitsu.com, linux@horizon.com Subject: Re: [PATCH v5 10/10] module: Rework module_addr_{min,max} Message-ID: <20150414130041.GA425@gmail.com> References: <20150413141126.756350256@infradead.org> <20150413141213.800009335@infradead.org> <20150413165636.GH6040@gmail.com> <20150414125657.GM5029@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150414125657.GM5029@twins.programming.kicks-ass.net> 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 Content-Length: 1483 Lines: 39 * Peter Zijlstra wrote: > On Mon, Apr 13, 2015 at 06:56:36PM +0200, Ingo Molnar wrote: > > > + * Bounds of module allocation, for speeding up __module_address. > > > + * Protected by module_mutex. > > > + */ > > > +static unsigned long module_addr_min = -1UL, module_addr_max = 0; > > > > I suspect the same .data vs. .bss problem affects the #else branch as > > well? > > Yes, but the linear walk already has a 'problem', other than the linear > walk itself being one, the list_head isn't actually on the same line as > the 'key' entries -- although I suppose I could fix that for the > !CONFIG_MODULES_TREE_LOOKUP case. > > > If so then it would make sense IMHO to put the structure definition > > into generic code so that both variants benefit from the shared > > cacheline? > > Isn't this optimizing hopeless code? I mean, I can make the change; > something like the below. Although I suppose we should use > ____cacheline_aligned here and just take the false sharing. Well, I think the point is to share more code and move the two variants closer to each other without hurting either side - not to optimize the slower side necessarily. But I have no strong opinions either way! Thanks, Ingo -- 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/