Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390AbZA2SuE (ORCPT ); Thu, 29 Jan 2009 13:50:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753216AbZA2Stg (ORCPT ); Thu, 29 Jan 2009 13:49:36 -0500 Received: from terminus.zytor.com ([198.137.202.10]:35124 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753135AbZA2Ste (ORCPT ); Thu, 29 Jan 2009 13:49:34 -0500 Message-ID: <4981FA0B.5010101@zytor.com> Date: Thu, 29 Jan 2009 10:48:43 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Christoph Lameter CC: Mathieu Desnoyers , Rusty Russell , Tejun Heo , Ingo Molnar , Herbert Xu , akpm@linux-foundation.org, brgerst@gmail.com, ebiederm@xmission.com, travis@sgi.com, linux-kernel@vger.kernel.org, steiner@sgi.com, hugh@veritas.com, "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH] percpu: add optimized generic percpu accessors References: <20090115183942.GA6325@elte.hu> <200901271213.18605.rusty@rustcorp.com.au> <497E705B.5000302@kernel.org> <200901282108.51864.rusty@rustcorp.com.au> <20090128180757.GA9908@Krystal> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1091 Lines: 28 Christoph Lameter wrote: > > gcc/glibc support a __thread attribute to variables. As far as I can tell > this automatically makes gcc perform the relocation to the current > context using a segment register. > > But its a weird ABI http://people.redhat.com/drepper/tls.pdf. After > reading that I agree that we should stay with the cpu ops and forget about > the local and thread stuff in gcc/glibc. > We have discussed this a number of times. There are several issues with it; one being that per-cpu != per-thread (we can switch CPU whereever we're preempted), and another that many versions of gcc uses hardcoded registers, in particular %fs on 64 bits, but the kernel *has* to use %gs since there is no swapfs instruction. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- 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/