Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756153AbcDGMZe (ORCPT ); Thu, 7 Apr 2016 08:25:34 -0400 Received: from casper.infradead.org ([85.118.1.10]:59829 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755794AbcDGMZc (ORCPT ); Thu, 7 Apr 2016 08:25:32 -0400 Date: Thu, 7 Apr 2016 14:25:28 +0200 From: Peter Zijlstra To: Florian Weimer Cc: Mathieu Desnoyers , "H. Peter Anvin" , Andrew Morton , Russell King , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-api , Paul Turner , Andrew Hunter , Andy Lutomirski , Andi Kleen , Dave Watson , Chris Lameter , Ben Maurer , rostedt , "Paul E. McKenney" , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Boqun Feng Subject: Re: [RFC PATCH v6 1/5] Thread-local ABI system call: cache CPU number of running thread Message-ID: <20160407122528.GS3430@twins.programming.kicks-ass.net> References: <5702A037.60200@zytor.com> <492303698.44994.1459799188052.JavaMail.zimbra@efficios.com> <856357054.45028.1459802903401.JavaMail.zimbra@efficios.com> <5703E191.2040707@redhat.com> <20160405164722.GB3430@twins.programming.kicks-ass.net> <570621E5.7060306@redhat.com> <20160407103158.GP3430@twins.programming.kicks-ass.net> <570638D9.7010108@redhat.com> <20160407111938.GR3430@twins.programming.kicks-ass.net> <57064CA9.101@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <57064CA9.101@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1127 Lines: 31 On Thu, Apr 07, 2016 at 02:03:53PM +0200, Florian Weimer wrote: > > struct tlabi { > > union { > > __u8[64] __foo; > > struct { > > /* fields go here */ > > }; > > }; > > } __aligned__(64); > > That's not really “fixed size” as far as an ABI is concerned, due to the > possibility of future extensions. sizeof(struct tlabi) is always the same, right? How is that not fixed? > > People objected against the fixed size scheme, but it being possible to > > get a fixed TCB offset and reduce indirections is a big win IMO. > > It's a difficult trade-off. It's not an indirection as such, it's avoid > loading the dynamic TLS offset. What we _want_ is being able to use %[gf]s:offset and have it work (I forever forget which segment register userspace TLS uses). > Let me repeat that the ELF TLS GNU ABI has very limited support for > static offsets at present, and it is difficult to make them available > more widely without code generation at run time (in the form of text > relocations, but still). Do you have a pointer to something I can read? Because I'm clearly not understanding the full issue here.