Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755618AbYGIUB1 (ORCPT ); Wed, 9 Jul 2008 16:01:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751597AbYGIUBS (ORCPT ); Wed, 9 Jul 2008 16:01:18 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:52956 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186AbYGIUBR (ORCPT ); Wed, 9 Jul 2008 16:01:17 -0400 Date: Wed, 9 Jul 2008 22:00:57 +0200 From: Ingo Molnar To: Christoph Lameter Cc: Jeremy Fitzhardinge , Mike Travis , Andrew Morton , "Eric W. Biederman" , "H. Peter Anvin" , Jack Steiner , linux-kernel@vger.kernel.org Subject: Re: [RFC 00/15] x86_64: Optimize percpu accesses Message-ID: <20080709200057.GA14009@elte.hu> References: <4874FFC4.7050505@linux-foundation.org> <487502BD.2020206@goop.org> <487504A8.5040000@linux-foundation.org> <487507E7.6010102@goop.org> <48750945.8000201@linux-foundation.org> <48750C6C.5090606@goop.org> <48750D96.7030407@linux-foundation.org> <4875123F.1070504@goop.org> <20080709194136.GD4804@elte.hu> <4875170C.4090500@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4875170C.4090500@linux-foundation.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1907 Lines: 45 * Christoph Lameter wrote: > Ingo Molnar wrote: > > > that makes sense. Does everyone agree on #1-#2-#3 and then gradual > > elimination of most pda members (without going through an > > intermediate renaming of pda members) being the way to go? > > I think we all agree on 1-2-3. > > The rest is TBD. Hope Jeremy can add his wisdom there to get the pda.X > replaced by the proper percpu names for 32 bit. > > With Jeremy's approach we would be doing two steps at once (getting > rid of pda ops plus unifying the variable names between 32 and 64 > bit). Maybe more difficult to verify correctness. The removal of the > pda ops is a pretty straighforward conversion. Yes, but there's nothing magic about pda variables versus percpu variables. We should be able to do the pda -> unified step just as much as we can do a percpu -> unified step. We can think of pda as a funky, pre-percpu-era relic. The only thing that percpu really offers over pda is its familarity. read_pda() has the per-cpu-ness embedded in it, which is nasty with regard to tracking preemption properties, etc. So converting to percpu would bring us CONFIG_PREEMPT_DEBUG=y checking to those ex-pda variables. Today if a read_pda() (or anything but pcurrent) is done in a non-preempt region that's likely a bug - but nothing warns about it. So in that light 4-15 might make some sense in standardizing all these accesses and making sure it all fits into an existing, familar API world, with no register level assumptions and assembly (and ABI) ties, which is instrumented as well, with explicit smp_processor_id() dependencies, etc. 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/