Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104379 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 48708 invoked from network); 13 Feb 2019 12:19:27 -0000 Received: from unknown (HELO mail-it1-f178.google.com) (209.85.166.178) by pb1.pair.com with SMTP; 13 Feb 2019 12:19:27 -0000 Received: by mail-it1-f178.google.com with SMTP id v72so4045985itc.0 for ; Wed, 13 Feb 2019 01:02:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1Lq30tOXe0jmUCe0DOqFhLi/zTzLf52Oy+HTBl3GjK4=; b=l67YAckLOe5MkL+maLNnj3e2oTLykEirMMdm9iZ5G85WAd4qwa9euExvH+Dnoz+5HB RhoCE3AohHfGyne6GOs2jn6ikKjE/VBEgsURkwvBWVoky5VFV7LRD0Ol8jP3LzopRgzJ KTZ0XlaRHpRHra8JvFu1ZFudrVWlWCQR5bX0LrFGO1srB5lBEI+Rq6+d+UCWwklJvmXm x3orK4DR4myTZ8NzHs3vNN+22+AMiDQf8dxshm3YRp1VDCd79hRTzrjVEW9tW4bVC5Nr 5Zg/k2Znni8cM0B9fa1xZDbdk9vKvqnmjqjWjkR32VWzWaBa4mwpLBv65A/O1LjYiYMC w3sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1Lq30tOXe0jmUCe0DOqFhLi/zTzLf52Oy+HTBl3GjK4=; b=YCkCNUPbV1+mNNc4xz5qaYa35Q456s3EgfEfm8NkzUE/Q+sRytdpTeDpnpkhdB6vZc 5lNLMOH+21oVXqkBce7we4WFNHEhz2Ix+97QMrxSBmXTurz2Z1t0EudDVBOfozPyp0is 8vBnXV/GLa0TLK20OGyOwhJB4/BPSMR9VB4g8nWIAy3fI29Yhgcyw85+1fNixmacgoAX VH4TTaseFe/0ti4WSvFF7GSgMg6y5eBtS1kj7f7/W3OfUZzaUveQpW4WKJSCoakSZCs0 WWFVLXHsPtDliHFTQi/4gWsDjvX2HahMeHxrCJHMzOs8h47m9s658j+8D+J+GQVookYi qBPA== X-Gm-Message-State: AHQUAuY8HoQXP8kI5IbCpup+xS7agElXPw3bzWeLJLLcgr57/PdQLcpU eTTlS/A6fbFDoHXpGZOUdglgj0aC5E0G7jqgsnc= X-Google-Smtp-Source: AHgI3IaQKrE+fAL6Jsxu431RjqYvB65LvyCiatAK05Dh6mU50muqBIaREZJUBly5RcmbHkZ/rN/X70KiyXAPlqPWAeI= X-Received: by 2002:a05:660c:81a:: with SMTP id j26mr1594969itk.70.1550048552393; Wed, 13 Feb 2019 01:02:32 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 13 Feb 2019 10:02:16 +0100 Message-ID: To: Dmitry Stogov Cc: Joe Watkins , Bob Weinand , Nikita Popov , "Anatol Belski (ab@php.net)" , "zeev@php.net" , PHP internals Content-Type: multipart/alternative; boundary="00000000000059a79b0581c2cda1" Subject: Re: ZTS improvement idea From: nikita.ppv@gmail.com (Nikita Popov) --00000000000059a79b0581c2cda1 Content-Type: text/plain; charset="UTF-8" On Wed, Feb 13, 2019 at 9:26 AM Dmitry Stogov wrote: > Hi, > > > After JIT+ZTS related discussion with Joe and Bob, and some related > analyzes. > > I came to more or less formed design idea and described it at > https://wiki.php.net/zts-improvement > > This is not an RFC and I'm not sure, if I like to implement TSRM changes > myself now. > > > Comments are welcome. > Hi Dmitry, Thanks for looking into this issue. As a possible alternative I would like to suggest the use of ZEND_TLS (__thread) for the EG/CG/BG etc globals on Linux (on Windows this is not possible due to DLL linkage restrictions). __thread generates very good code (single load over %fs segment with constant address) if the global is defined and used in an executable. I'm not sure what kind of code it generates when TLS is declared in an executable and used in a shared object, but as direct access from extensions to the engine globals shouldn't be common, it's probably okay even if it uses __tls_get_addr. Nikita --00000000000059a79b0581c2cda1--