From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 685A51BDDA; Thu, 5 Jul 2018 11:25:13 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E512621CD0; Thu, 5 Jul 2018 05:25:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 05 Jul 2018 05:25:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=HvKK/as4pdiwsAPIkBiAzUE504 oAFBpRRE3eKLooEcY=; b=EeoJAfFWSQEDVF3op3Ifr5rPl4ieFMfqyDfW+czi/s YOdcRGdGLTS45g/ywJYwJGqcA4k6ofFw5S3i8sM/HwrQray7o0U9o2x2+efem5G3 SAeiZ7V4rdYOj/5u2EjNIOpK+0267VFwvJfK7gMJ5SE3be7CGFPMBk5ddp5/L8V+ 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=HvKK/a s4pdiwsAPIkBiAzUE504oAFBpRRE3eKLooEcY=; b=Pzq9GVVNU8+3geeB7pI0a4 g0NgXlCyw3UxQGohLqyBPbRCT1BPZMvmJ5RcW7QIYn+g/hX1nTJFTqR2Fg9tMbIR uljckR4FT8INx0zZrw+xQR6R2ao+UFW6Vi8PwV4Sgu1NNSZHGlom9kC2EkOwNjXh +T2dUzB3xr8CYsC8J7cHtwotNq9EJaSE8QCsbHwNV9XIG5B1HRR8j3WGS0KqnVhC 4slaybqW9ipQWKOFs2SzeMkC0thqi9ZuoU7Pkc6+Sj/mAqiIWworSmGSxsuFvJdf b3ntHuT+LEv2dB1pZd2JPcbGnxtnDFCoknmmTva+vWUrxfIdNY+RlpUI/ds2mAyQ == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D1AB610336; Thu, 5 Jul 2018 05:25:11 -0400 (EDT) From: Thomas Monjalon To: Marvin Liu Cc: zhiyong.yang@intel.com, dev@dpdk.org, techboard@dpdk.org Date: Thu, 05 Jul 2018 11:25:09 +0200 Message-ID: <1722333.AV9Rg5NKm1@xps> In-Reply-To: <20180705141321.129989-1-yong.liu@intel.com> References: <20180705141321.129989-1-yong.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mk: using initial-exec model for thread local variable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2018 09:25:13 -0000 05/07/2018 16:13, Marvin Liu: > When building share library, thread-local storage model will be changed > to global-dynamic. It will add additional cost for reading thread local > variable. On the other hand, dynamically load share library with static > TLS will request additional DTV slot which is limited by loader. By now > only librte_pmd_eal.so contain thread local variable. So that can make > TLS model back to initial-exec like static library for better > performance. > > Signed-off-by: Marvin Liu > > diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk > index 7e4531bab..19d5e11ef 100644 > --- a/mk/toolchain/gcc/rte.vars.mk > +++ b/mk/toolchain/gcc/rte.vars.mk It is only for GCC? not clang? > +# Initial execution TLS model has better performane compared to dynamic > +# global. But this model require for addtional slot on DTV when dlopen > +# object with thread local variable. Few typos in this comment. > +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) > +TOOLCHAIN_CFLAGS += -ftls-model=initial-exec > +endif We really need more test or review of this patch. Cc techboard: do we take the risk of getting it in RC1 without review? It is waiting for long.