[PATCH x86_64][BZ #20139] Don't allow configure with not supporting AVX512 assembler w/o --disable-avx512.
Florian Weimer
fweimer@redhat.com
Tue Jun 28 11:46:00 GMT 2016
On 06/27/2016 07:40 PM, Andrew Senkevich wrote:
> Hi,
>
> this patch adds new configure option --enable-avx512 and defaults it for x86_64.
>
> To fix BZ #20139 we need don't let to configure with not supporting
> AVX512 assembler w/o --disable-avx512.
>
> 2016-06-27 Andrew Senkevich <andrew.senkevich@intel.com>
>
> [BZ #20139]
> * configure.ac: Added --enable-avx512.
> * sysdeps/x86_64/configure.ac: Check for --disable-avx512
> if no AVX512 assembler support.
> * configure: Regenerated.
> * sysdeps/x86_64/configure: Likewise.
> * manual/install.texi (Configuring and compiling): Document
> --enable-avx512.
> * INSTALL: Regenerated.
I thought about this some more, and we have to either of two things:
(a) Tell the kernel to set the feature support mask using XSETBV to the
AND of what is supported by the hardware, the kernel, and the dynamic
linker. This likely needs kernel changes (new prctl interface).
or
(b) Use XSAVE/XRSTOR to save and restore the extended CPU state around
the call to _dl_fixup, instead of guessing what the kernel and
application code expects.
If we don't anything here, we will keep running into the same issue,
which is not acceptable IMHO.
Option (b) seems to be rather costly both in terms of stack space (2688
bytes) and cycles. So we would probably keep the existing wrappers
which save registers selectively, and use approach (b) only in case when
XGETBV with ECX=0 returns feature bits we know nothing about (or cannot
build support into glibc, as with !HAVE_AVX512_ASM_SUPPORT).
Comments?
Thanks,
Florian
More information about the Libc-alpha
mailing list