This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] A method for forcing IFUNC selector
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Paul Pluzhnikov <ppluzhnikov at gmail dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>, Ondrej Bilka <neleai at seznam dot cz>, Brooks Moses <bmoses at google dot com>
- Date: Thu, 6 Nov 2014 14:05:28 -0800 (PST)
- Subject: Re: [RFC] A method for forcing IFUNC selector
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobMYNLsv6NSmXqwj7j4kCx1XaQU9m0VExFMrtb3SVKpNxg at mail dot gmail dot com>
Please contribute to benchtests so that they are more representative of a
variety of workloads. Those tests are how we make decisions about changes
intended to improve performance, so improving them is how we can improve
that decision-making.
There is indeed no mechanism to control the selection. It just uses cpuid
directly to set up __cpu_features and then each selector has its own logic
to choose an implementation based on that.
I am not very sanguine either about random new environment variables, nor
about a mechanism that has users picking implementations by internal symbol
name.
As to the basic way in to do any kind of tweak like this, that is the
long-standing subject of "tunables". We have had (for years now, I guess)
a plan to get a plan about that subject, but nobody has put real work into
even proposing a model. (I have previously lodged strenuous objection to
willy-nilly adding magic environment variables. But I haven't proposed a
specific alternative mechanism.)
As to how you'd go about describing what it is you want once there were a
place to put it, that also needs some thought. I'm more positively
disposed towards ideas like a mask for cpuid feature bits, which would be
more generic and more in terms of the well-specified aspects of the
hardware rather than feeling like an API that talks in terms of
implementation internals, which seems wrong. But I can see how that might
not actually give you the knob you really want.