From owner-freebsd-threads@FreeBSD.ORG Wed Jun 18 01:56:21 2003 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 AAEB337B401 for ; Wed, 18 Jun 2003 01:56:21 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 197F143F75 for ; Wed, 18 Jun 2003 01:56:21 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfl1t.dialup.mindspring.com ([165.247.212.61] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19SYjc-0005CV-00; Wed, 18 Jun 2003 01:56:05 -0700 Message-ID: <3EF02888.4E72CE7F@mindspring.com> Date: Wed, 18 Jun 2003 01:53:28 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: David Xu References: <20030617071810.GA2451@dhcp01.pn.xcllnt.net> <002101c3352a$e931a7f0$0701a8c0@tiger> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a400d9487570c13715de391cab7bb4f1fc387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: threads@freebsd.org cc: Julian Elischer cc: Marcel Moolenaar Subject: Re: Nvidia, TLS and __thread keyword -- an observation 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: Wed, 18 Jun 2003 08:56:22 -0000 David Xu wrote: [ ... implicit TLS initialization and destruction ... ] > I believe this will add overhead to thread creating and destroying, Yes. It will. See my other posting for the tradeoffs. The complexity is not as bad as Marcel makes out, but it's still a bad tradeoff for most existing threaded applications and libraries, even if we thing more people will use implict TLS as time goes on. I think it's the wrong tradeoff, too. I would make them burn a general purpose register -- one that they are allowed to burn, as an application -- on FreeBSD. I have a hard time believing that any of their functions use up all the registers, even on a register-poor CISC architecture like x86; if they are that complex, then they are doing so much stuff that explicit TLS access overhead would be lost in the noise. -- Terry