Date: Wed, 18 Jun 2003 11:26:38 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Terry Lambert <tlambert2@mindspring.com> Cc: threads@freebsd.org Subject: Re: Nvidia, TLS and __thread keyword -- an observation Message-ID: <20030618182638.GA63660@ns1.xcllnt.net> In-Reply-To: <3EF02B40.A4BD1EF@mindspring.com> References: <20030617223910.GB57040@ns1.xcllnt.net> <002101c3352a$e931a7f0$0701a8c0@tiger> <20030618003556.GA2440@dhcp01.pn.xcllnt.net> <3EF02B40.A4BD1EF@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030618182638.GA63660>