From owner-freebsd-threads@FreeBSD.ORG Sat Apr 3 09:24:43 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9210D16A4CE for ; Sat, 3 Apr 2004 09:24:43 -0800 (PST) Received: from herring.rabson.org (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7892A43D53 for ; Sat, 3 Apr 2004 09:24:42 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from herring.rabson.org (herring.rabson.org [10.0.0.2]) by herring.rabson.org (8.12.11/8.12.11) with ESMTP id i33HNtUP069511; Sat, 3 Apr 2004 18:23:55 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: Daniel Eischen Date: Sat, 3 Apr 2004 18:23:54 +0100 User-Agent: KMail/1.6.1 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404031823.54815.dfr@nlsystems.com> X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on herring.rabson.org X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: threads@freebsd.org cc: Julian Elischer Subject: Re: PERFORCE change 50188 for review X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2004 17:24:43 -0000 On Friday 02 April 2004 21:22, Daniel Eischen wrote: > On Fri, 2 Apr 2004, Julian Elischer wrote: > > > > The SUN API allows the destination of the %gs:0 to be changes at > > runtime by the user this allowing the UTS to switch threads "on the > > fly" without going back to the kernel. > > Yes, please, I don't see how the one extra indirection is > really going to affect much. This is where we intended to > go months ago (and years ago WRT KSE in general), and > everything has been designed around it. I was just wandering around the internet looking at the scenery and I ended up here: http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html. This document describes a new options (which is not supported by the compiler in current right now), -mno-tls-direct-seg-refs. This looks like it will do everything we need for both i386 and amd64, i.e. instead of code like: movl %gs:x@ntpoff, %eax it should generate: movl %gs:0, %eax movl x@ntpoff(%eax), %eax Although I'm still not quite convinced that we can't do the first version with essentially zero cost for i386 at least.