public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug string/27457] vzeroupper use in AVX2 multiarch string functions cause HTM aborts
Date: Mon, 01 Mar 2021 13:21:29 +0000 [thread overview]
Message-ID: <bug-27457-131-2dfSdbW56r@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27457-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=27457
--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Florian Weimer from comment #6)
> (In reply to H.J. Lu from comment #5)
> > I added another set of AVX/AVX2 functions to support RTM. You can use
> > libcpu-rt-c.so:
> >
> > https://gitlab.com/cpu-rt/glibc/-/wikis/libcpu-rt-c.so-to-avoid-vzeroupper-
> > in-RTM-region
> >
> > to try it out.
>
> The sources do not seem to show the selection logic.
> __memset_avx2_unaligned_rtm seems to simply have dropped the VZEROUPPER
> instruction, which can't be good for general application performance.
memset-avx2-unaligned-erms-rtm.S has
#define ZERO_UPPER_VEC_REGISTERS_RETURN \
ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST
0000000000000040 <__memset_avx2_unaligned_rtm>:
40: f3 0f 1e fa endbr64
44: c5 f9 6e c6 vmovd %esi,%xmm0
48: 48 89 f8 mov %rdi,%rax
4b: c4 e2 7d 78 c0 vpbroadcastb %xmm0,%ymm0
50: 48 83 fa 20 cmp $0x20,%rdx
54: 0f 82 0b 01 00 00 jb 165
<__memset_avx2_unaligned_erms_rtm+0xc5>
5a: 48 83 fa 40 cmp $0x40,%rdx
5e: 77 75 ja d5
<__memset_avx2_unaligned_erms_rtm+0x35>
60: c5 fe 7f 44 17 e0 vmovdqu %ymm0,-0x20(%rdi,%rdx,1)
66: c5 fe 7f 07 vmovdqu %ymm0,(%rdi)
6a: e9 84 00 00 00 jmp f3
<__memset_avx2_unaligned_erms_rtm+0x53>
6f: 90 nop
,,,
00000000000000a0 <__memset_avx2_unaligned_erms_rtm>:
a0: f3 0f 1e fa endbr64
a4: c5 f9 6e c6 vmovd %esi,%xmm0
a8: 48 89 f8 mov %rdi,%rax
ab: c4 e2 7d 78 c0 vpbroadcastb %xmm0,%ymm0
b0: 48 83 fa 20 cmp $0x20,%rdx
b4: 0f 82 ab 00 00 00 jb 165
<__memset_avx2_unaligned_erms_rtm+0xc5>
ba: 48 83 fa 40 cmp $0x40,%rdx
be: 77 0c ja cc
<__memset_avx2_unaligned_erms_rtm+0x2c>
c0: c5 fe 7f 44 17 e0 vmovdqu %ymm0,-0x20(%rdi,%rdx,1)
c6: c5 fe 7f 07 vmovdqu %ymm0,(%rdi)
ca: eb 27 jmp f3
<__memset_avx2_unaligned_erms_rtm+0x53>
cc: 48 3b 15 00 00 00 00 cmp 0x0(%rip),%rdx # d3
<__memset_avx2_unaligned_erms_rtm+0x33>
d3: 77 9f ja 74 <__memset_avx2_erms_rtm+0x4>
d5: 48 81 fa 80 00 00 00 cmp $0x80,%rdx
dc: 77 22 ja 100
<__memset_avx2_unaligned_erms_rtm+0x60>
de: c5 fe 7f 07 vmovdqu %ymm0,(%rdi)
e2: c5 fe 7f 47 20 vmovdqu %ymm0,0x20(%rdi)
e7: c5 fe 7f 44 17 e0 vmovdqu %ymm0,-0x20(%rdi,%rdx,1)
ed: c5 fe 7f 44 17 c0 vmovdqu %ymm0,-0x40(%rdi,%rdx,1)
f3: 0f 01 d6 xtest
f6: 74 04 je fc
<__memset_avx2_unaligned_erms_rtm+0x5c>
f8: c5 fc 77 vzeroall
fb: c3 ret
fc: c5 f8 77 vzeroupper
ff: c3 ret
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2021-03-01 13:21 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 12:40 [Bug string/27457] New: " rguenth at gcc dot gnu.org
2021-02-22 12:40 ` [Bug string/27457] " rguenth at gcc dot gnu.org
2021-02-22 14:50 ` matz at suse dot de
2021-02-22 15:00 ` rguenth at gcc dot gnu.org
2021-02-22 15:26 ` hjl.tools at gmail dot com
2021-02-22 15:26 ` hjl.tools at gmail dot com
2021-02-22 18:45 ` fweimer at redhat dot com
2021-02-23 9:44 ` roman.dementiev at intel dot com
2021-02-27 2:39 ` hjl.tools at gmail dot com
2021-02-27 7:34 ` rguenther at suse dot de
2021-02-28 14:53 ` hjl.tools at gmail dot com
2021-03-01 11:32 ` fweimer at redhat dot com
2021-03-01 12:24 ` mliska at suse dot cz
2021-03-01 12:47 ` rguenther at suse dot de
2021-03-01 13:13 ` roman.dementiev at intel dot com
2021-03-01 13:19 ` fweimer at redhat dot com
2021-03-01 13:21 ` hjl.tools at gmail dot com [this message]
2021-03-01 13:24 ` hjl.tools at gmail dot com
2021-03-01 13:27 ` hjl.tools at gmail dot com
2021-03-01 13:29 ` hjl.tools at gmail dot com
2021-03-01 13:44 ` rguenth at gcc dot gnu.org
2021-03-01 14:05 ` hjl.tools at gmail dot com
2021-03-01 14:14 ` rguenther at suse dot de
2021-03-01 14:25 ` rguenth at gcc dot gnu.org
2021-03-01 14:37 ` hjl.tools at gmail dot com
2021-03-01 14:47 ` hjl.tools at gmail dot com
2021-03-01 14:49 ` rguenth at gcc dot gnu.org
2021-03-01 14:53 ` rguenth at gcc dot gnu.org
2021-03-01 15:19 ` hjl.tools at gmail dot com
2021-03-01 23:39 ` hjl.tools at gmail dot com
2021-03-05 16:54 ` hjl.tools at gmail dot com
2021-03-11 10:42 ` rguenth at gcc dot gnu.org
2021-03-16 13:53 ` rguenth at gcc dot gnu.org
2021-03-16 14:12 ` hjl.tools at gmail dot com
2021-03-29 23:00 ` hjl.tools at gmail dot com
2022-01-27 20:21 ` cvs-commit at gcc dot gnu.org
2022-01-27 20:23 ` cvs-commit at gcc dot gnu.org
2022-01-27 20:47 ` cvs-commit at gcc dot gnu.org
2022-01-27 20:47 ` cvs-commit at gcc dot gnu.org
2022-01-27 20:48 ` cvs-commit at gcc dot gnu.org
2022-01-27 22:41 ` cvs-commit at gcc dot gnu.org
2022-01-28 2:24 ` hjl.tools at gmail dot com
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=bug-27457-131-2dfSdbW56r@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.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).