From owner-freebsd-threads@FreeBSD.ORG Mon Jun 16 18:44:25 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 7D48E37B401 for ; Mon, 16 Jun 2003 18:44:25 -0700 (PDT) Received: from hqemgate00.nvidia.com (hqemgate00.nvidia.com [216.228.112.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id D603243FBF for ; Mon, 16 Jun 2003 18:44:24 -0700 (PDT) (envelope-from gareth@nvidia.com) Received: from mail-sc-0.nvidia.com (Not Verified[172.16.217.105]) id ; Mon, 16 Jun 2003 18:47:11 -0700 Received: by mail-sc-0.nvidia.com with Internet Mail Service (5.5.2653.19) id ; Mon, 16 Jun 2003 18:43:51 -0700 Message-ID: <2D32959E172B8F4D9B02F68266BE421401A6D7E8@mail-sc-3.nvidia.com> From: Gareth Hughes To: 'Alexander Kabaev' Date: Mon, 16 Jun 2003 18:43:50 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain cc: threads@freebsd.org cc: zander@mail.minion.de cc: 'Julian Elischer' cc: Andy Ritger cc: Daniel Eischen Subject: RE: NVIDIA and TLS 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: Tue, 17 Jun 2003 01:44:25 -0000 On Mon, 16 Jun 2003, Alexander Kabaev wrote: > > That was very nice of them to develop a "standard" which penalises each > and every threads implementation except pure kernel-based threads Linux > happens to implement now. > > Said that, I think FreeBSD will have to follow the suit sooner or later. > When the mass of Linux software using TLS reaches certain level, we'll > be unable to ignore its requirements. It is sad though that we'll have > to give up a some of our performance optimizations. No, this is simply not true. If your thread library implementation is that much better than anything else out there, simply support the dynamic access models (General Dynamic and Local Dynamic) only. Both of these models require at least one function call to access __thread variables (the former requiring one per access, while the latter is one for the first __thread variable accessed in a given function). This will work just fine, no matter how you've implemented your threading library. One of the benefits of the Linux implementation is that it allows the static TLS access methods (Initial Exec and Local Exec) to be used. If your implementation fundamentally can't support these access models, then just don't support them. -- Gareth Hughes (gareth@nvidia.com) OpenGL Developer, NVIDIA Corporation