From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751169AbWH3RNo (ORCPT ); Wed, 30 Aug 2006 13:13:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751170AbWH3RNn (ORCPT ); Wed, 30 Aug 2006 13:13:43 -0400 Received: from gw.goop.org ([64.81.55.164]:46018 "EHLO mail.goop.org") by vger.kernel.org with ESMTP id S1751169AbWH3RNn (ORCPT ); Wed, 30 Aug 2006 13:13:43 -0400 Message-ID: <44F5C73F.2060308@goop.org> Date: Wed, 30 Aug 2006 10:13:35 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 1.5.0.5 (X11/20060803) MIME-Version: 1.0 To: Andi Kleen CC: Chuck Ebbert <76306.1226@compuserve.com>, linux-kernel , Zachary Amsden , Jan Beulich , Andrew Morton Subject: Re: [PATCH RFC 0/6] Implement per-processor data areas for i386. References: <200608300838_MC3-1-C9C6-CA79@compuserve.com> <44F5BF29.7080004@goop.org> <200608301848.39443.ak@suse.de> In-Reply-To: <200608301848.39443.ak@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Andi Kleen wrote: > I tried that once on x86-64, but it wasn't possible because the linker > is missing the right relocations. It has something on the first look similar > for __thread data in user space, but it wasn't usable for the kernel. > The other difficulty is that you can't take the addresses of things in the pda and pass them around, which happens a lot. It would be another matter if you could add an attribute to a pointer which told gcc "always use a %gs override for indirecting through this pointer", though that would still require some type qualifier on any pointer which holds the value. (Hm, it would be interesting to see if we could possibly use the code generated by gcc for TLS variables...) > Even with a single indirection it is still far more efficient than a > array lookup. Yes. Even in the Xen case it will be useful to have a pointer to the vcpu structure, at least until Xen can be convinced to put the vcpu structure in the PDA itself. J