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 <yong....@intel.com> > > 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.