From owner-freebsd-threads@FreeBSD.ORG Wed Jun 18 15:19:32 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 A51A837B401 for ; Wed, 18 Jun 2003 15:19:32 -0700 (PDT) Received: from rwcrmhc12.attbi.com (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37FBE43F93 for ; Wed, 18 Jun 2003 15:19:32 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([12.233.125.100]) by attbi.com (rwcrmhc12) with ESMTP id <2003061822193101400fqcmhe>; Wed, 18 Jun 2003 22:19:31 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA40890; Wed, 18 Jun 2003 15:19:31 -0700 (PDT) Date: Wed, 18 Jun 2003 15:19:30 -0700 (PDT) From: Julian Elischer To: Marcel Moolenaar In-Reply-To: <20030618182638.GA63660@ns1.xcllnt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: David Xu cc: threads@freebsd.org 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 22:19:32 -0000 Marcel, are you (or do you kno of anyone else) doing anything on TLS? On Wed, 18 Jun 2003, Marcel Moolenaar wrote: > On Wed, Jun 18, 2003 at 02:05:04AM -0700, Terry Lambert wrote: > > Marcel Moolenaar wrote: > > > On Wed, Jun 18, 2003 at 07:48:09AM +0800, David Xu wrote: > > > > I believe this will add overhead to thread creating and destroying, > > > > How fast an RTLD can be in this case ? > > > > > > In the dynamic TLS model you would like to delay the creation of > > > the TLS space. Normally __tls_get_addr() gets used for this. In > > > the static TLS model you allocate the TLS when you llocate the > > > thread control structure. > > > > Lazy binding in this context doesn't make a lot of sense. > > It does. In a process with 1000 threads where 1 thread does > a dlopen(), you don't want to create 999 TLS spaces if they're > not going to be used. Besides time, this also is a space > issue. > > Note also that I don't advocate what I think we should do, but > what the specification is designed for. People have put some > thought in it... > > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net >