Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755044AbYGJAYI (ORCPT ); Wed, 9 Jul 2008 20:24:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751957AbYGJAX4 (ORCPT ); Wed, 9 Jul 2008 20:23:56 -0400 Received: from gw.goop.org ([64.81.55.164]:47699 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbYGJAX4 (ORCPT ); Wed, 9 Jul 2008 20:23:56 -0400 Message-ID: <4875568F.6030309@goop.org> Date: Wed, 09 Jul 2008 17:23:43 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: "Eric W. Biederman" CC: Christoph Lameter , Ingo Molnar , Mike Travis , Andrew Morton , "H. Peter Anvin" , Jack Steiner , linux-kernel@vger.kernel.org, Arjan van de Ven Subject: Re: [RFC 00/15] x86_64: Optimize percpu accesses References: <20080709165129.292635000@polaris-admin.engr.sgi.com> <20080709200757.GD14009@elte.hu> <48751B57.8030605@goop.org> <48751CF9.4020901@linux-foundation.org> <4875209D.8010603@goop.org> <48752CCD.30507@linux-foundation.org> <48753C99.5050408@goop.org> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1399 Lines: 37 Eric W. Biederman wrote: > Jeremy Fitzhardinge writes: > > >>> Which means that my idea of using the technique we use on x86_32 will not >>> >> work. >> >> No, the compiler memory model we use guarantees that everything will be within >> 2G of each other. The linker will spew loudly if that's not the case. >> > > The per cpu area is at least theoretically dynamically allocated. And we > really want to put it in cpu local memory. Which means on any reasonable > NUMA machine the per cpu areas should be all over the box. > Yes, but that doesn't matter in the slightest. The effective address will be within 2G of the base; the base can be anywhere. > So there is no guarantee that with an arbitrary 64bit address in %gs of anything. > > Grr. Except you are correct. We have to guarantee that the offsets we have > chosen at compile time still work. And we know all of the compile time offsets > will be in the -2G range. So they are all 32bit numbers. Negative 32bit > numbers to be sure. That trivially leaves us with everything working except > the nasty hard coded decimal 40. > Right. J -- 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/