From: Florian Weimer <fw@deneb.enyo.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: "H. J. Lu" <hjl.tools@gmail.com>, X86 ML <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>, "Bae\,
Chang Seok" <chang.seok.bae@intel.com>,
"Carlos O'Donell" <carlos@redhat.com>,
Rich Felker <dalias@libc.org>,
libc-alpha <libc-alpha@sourceware.org>
Subject: Re: Why does glibc use AVX-512?
Date: Fri, 26 Mar 2021 20:34:26 +0100 [thread overview]
Message-ID: <87blb5d7zx.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <CALCETrUM1=Db3vmQAhPkt=SktL7+dtUrt5Ef6BP3T1Q6HY3Bmw@mail.gmail.com> (Andy Lutomirski's message of "Fri, 26 Mar 2021 11:14:22 -0700")
* Andy Lutomirski:
>> > AVX-512 cleared, and programs need to explicitly request enablement.
>> > This would allow programs to opt into not saving/restoring across
>> > signals or to save/restore in buffers supplied when the feature is
>> > enabled.
>>
>> Isn't XSAVEOPT already able to handle that?
>>
>
> Yes, but we need a place to put the data, and we need to acknowledge
> that, with the current save-everything-on-signal model, the amount of
> time and memory used is essentially unbounded. This isn't great.
The size has to have a known upper bound, but the save amount can be
dynamic, right?
How was the old lazy FPU initialization support for i386 implemented?
>> Assuming you can make XSAVEOPT work for you on the kernel side, my
>> instincts tell me that we should have markup for RTM, not for AVX-512.
>> This way, we could avoid use of the AVX-512 registers and keep using
>> VZEROUPPER, without run-time transaction checks, and deal with other
>> idiosyncrasies needed for transaction support that users might
>> encounter once this feature sees more use. But the VZEROUPPER vs RTM
>> issues is currently stuck in some internal process issue on my end (or
>> two, come to think of it), which I hope to untangle next month.
>
> Can you elaborate on the issue?
This is the bug:
vzeroupper use in AVX2 multiarch string functions cause HTM aborts
<https://sourceware.org/bugzilla/show_bug.cgi?id=27457>
Unfortunately we have a bug (outside of glibc) that makes me wonder if
we can actually roll out RTM transaction checks (or any RTM
instruction) on a large scale:
x86: Sporadic failures in tst-cpu-features-cpuinfo
<https://sourceware.org/bugzilla/show_bug.cgi?id=27398#c3>
The dynamic RTM check might trap due to this bug. (We have a bit more
information about the nature of the bug, currently missing from
Bugzilla.)
I'm also worried that the new dynamic RTM check in the string
functions has a performance impact. Due to its nature, it will be
enabled for every program once running on RTM-capable hardware, not
just those that actually use RTM.
next prev parent reply other threads:[~2021-03-26 19:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 4:38 Andy Lutomirski
2021-03-26 10:06 ` Borislav Petkov
2021-03-26 18:17 ` Andy Lutomirski
2021-03-26 12:12 ` Florian Weimer
2021-03-26 18:14 ` Andy Lutomirski
2021-03-26 19:34 ` Florian Weimer [this message]
2021-03-26 19:47 ` Andy Lutomirski
2021-03-26 20:06 ` Andrew Cooper
2021-03-26 20:35 ` Florian Weimer
2021-03-26 20:43 ` H.J. Lu
2021-03-26 20:48 ` Andy Lutomirski
2021-03-26 21:11 ` Florian Weimer
2021-03-26 21:21 ` Andy Lutomirski
2021-03-26 13:32 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blb5d7zx.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=carlos@redhat.com \
--cc=chang.seok.bae@intel.com \
--cc=dalias@libc.org \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).