Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39998 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9077 invoked from network); 18 Aug 2008 20:25:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2008 20:25:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:40027] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/B3-25897-ABAD9A84 for ; Mon, 18 Aug 2008 16:25:31 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 18 Aug 2008 23:26:24 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 18 Aug 2008 13:26:20 -0700 Message-ID: <48A9DAEC.5090001@zend.com> Date: Mon, 18 Aug 2008 13:26:20 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Arnaud Le Blanc CC: PHP Development References: <200808170419.11153.arnaud.lb@gmail.com> In-Reply-To: <200808170419.11153.arnaud.lb@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Aug 2008 20:26:20.0933 (UTC) FILETIME=[AD209B50:01C90170] Subject: Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS From: stas@zend.com (Stanislav Malyshev) Hi! > The following patch caches each global address in a native TLS variable so > that accessing a global is as simple as global_name->member. This removes the > requirement of passing the tls pointer across function calls, so that the two > major overheads of ZTS builds are avoided. I think it would be great to use __thread there. But I think if we have working __thread, why not have real globals use it, without all that TSRMG stuff? Having 3 different variants of TSRM support seems excessive. Now, the question is can we reliably detect if we have working __thread - or, in other words, are there compilers which would accept __thread but do not implement it correctly, and can those be identified automatically? If we use static declaration with __thread, then as far as I can see there is no need for separate IDs and all complications following from that. > - Declaring globals statically (--with-tsrm-full-__thread-tls) causes troubles > to dlopen(), actually Apache wont load the module at runtime (it works with > just --with-tsrm-__thread-tls). What is the problem there, could you elaborate? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com