PATCH: Check GLIBC_IFUNC to enable/disable ifunc features

H.J. Lu hjl.tools@gmail.com
Thu Jun 30 03:22:00 GMT 2016


On Wed, Jun 29, 2016 at 8:09 PM, Siddhesh Poyarekar
<siddhesh@sourceware.org> wrote:
> On Wed, Jun 29, 2016 at 11:15:22AM -0700, H.J. Lu wrote:
>> The current IFUNC selection is based on microbenchmarks in glibc.  It
>> should give the best performance for most workloads.  But other choices
>> may have better performance for a particular workload or the hardware
>> is too new to make the best choice.  We provide an environment variable,
>> GLIBC_IFUNC=xxx=0:yyy=1:zzz=0...., to enable CPU/ARCH feature yyy,
>> disable CPU/ARCH feature yyy and zzz, where the feature name is
>
> I'm afraid this scheme of values is going to hard to parse under
> tunables.  Tunables themselves have the same kind of syntax when used
> with a single environment variable.  How about having a single
> environment variable for each feature, such as GLIBC_IFUNC_X86_AVX and
> so on instead?

GLIBC_IFUNC must be processed after init_cpu_features is called and before
any relocation is performed.  Otherwise, IFUNC won't work correctly.  Can your
tunable scheme support it?

-- 
H.J.



More information about the Libc-alpha mailing list