Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754698AbYGIVTg (ORCPT ); Wed, 9 Jul 2008 17:19:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751455AbYGIVTY (ORCPT ); Wed, 9 Jul 2008 17:19:24 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49419 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751442AbYGIVTX (ORCPT ); Wed, 9 Jul 2008 17:19:23 -0400 Message-ID: <487529AE.3060505@zytor.com> Date: Wed, 09 Jul 2008 17:12:14 -0400 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Jeremy Fitzhardinge CC: Arjan van de Ven , Ingo Molnar , "Eric W. Biederman" , Mike Travis , Andrew Morton , Christoph Lameter , Jack Steiner , linux-kernel@vger.kernel.org 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> <20080709133958.612635f0@infradead.org> <4875231F.1020506@zytor.com> <487524A0.6020304@goop.org> In-Reply-To: <487524A0.6020304@goop.org> 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: 1554 Lines: 36 Jeremy Fitzhardinge wrote: > H. Peter Anvin wrote: >> 1. it means pda references are invalid if their offsets are ever more >> than CONFIG_PHYSICAL_BASE (which I do not think is likely, but still...) > > Why? > > As an aside, could we solve the problems by making CONFIG_PHYSICAL_BASE > 0 - putting the percpu variables as the first thing in the kernel - and > relocating on load? That would avoid having to make a special PT_LOAD > segment at 0. Hm, would that result in the pda and the boot params > getting mushed together? > CONFIG_PHYSICAL_START rather. And no, it can't be zero! Realistically we should make it 16 MB by default (currently 2 MB), to keep the DMA zone clear. Either way, I really suspect that the right thing to do is to use negative offsets, with the possible exception of a handful of things (40 bytes or less, perhaps like current) which can get small positive offsets and end up in the "super hot" cacheline. The sucky part is that I don't believe GNU ld has native support for a "hanging down" section (one which has a fixed endpoint rather than a starting point), so it requires extra magic around the link (or finding some way to do it with linker script functions.) Let me see if I can cook up something in linker script that would actually work. -hpa -- 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/