From: Aurelien Jarno <aurelien@aurel32.net>
To: Sunil Pandey <skpgkp2@gmail.com>
Cc: Noah Goldstein <goldstein.w.n@gmail.com>,
Libc-stable Mailing List <libc-stable@sourceware.org>,
Hongjiu Lu <hjl.tools@gmail.com>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH v5 2/2] x86: Optimize strlen-avx2.S
Date: Tue, 4 Oct 2022 23:19:58 +0200 [thread overview]
Message-ID: <YzyjfhOkGAjWkQfz@aurel32.net> (raw)
In-Reply-To: <CAMAf5_eD8ABiFiKabV5xKkR-xLR7sK7Dx18z4VoawUUwkomf+g@mail.gmail.com>
On 2022-09-28 06:54, Sunil Pandey via Libc-stable wrote:
> Attached patch fixes BZ# 29611.
>
> I would like to backport it to 2.32,2.31,2.30,2.29 and 2.29. Let me know
> if there is any objection.
Sorry to be late on this. I have a few comments about that patch:
> From 86e1d88e1a3c126597ef39165275ada7564cfce9 Mon Sep 17 00:00:00 2001
> From: "H.J. Lu" <hjl.tools@gmail.com>
> Date: Mon, 19 Apr 2021 10:45:07 -0700
> Subject: [PATCH] x86-64: Require BMI2 for strchr-avx2.S
>
> Since strchr-avx2.S updated by
>
> commit 1f745ecc2109890886b161d4791e1406fdfc29b8
> Author: noah <goldstein.w.n@gmail.com>
> Date: Wed Feb 3 00:38:59 2021 -0500
>
> x86-64: Refactor and improve performance of strchr-avx2.S
>
> uses sarx:
>
> c4 e2 72 f7 c0 sarx %ecx,%eax,%eax
>
> for strchr-avx2 family functions, require BMI2 in ifunc-impl-list.c and
> ifunc-avx2.h.
>
> (cherry picked from commit 83c5b368226c34a2f0a5287df40fc290b2b34359)
> ---
> sysdeps/x86_64/multiarch/ifunc-avx2.h | 4 ++--
> sysdeps/x86_64/multiarch/ifunc-impl-list.c | 12 +++++++++---
> 2 files changed, 11 insertions(+), 5 deletions(-)
First of all 1f745ecc2109890886b161d4791e1406fdfc29b8 never got
backported to 2.32 and older branches, and strchr-avx2.S in those
branches do not use BMI2 instructions. So it doesn't make sense to
backport it.
That said the change in ifunc-avx2.h fixes:
- memchr and rawmemchr, broken by the backport of acfd088a1963 ("x86:
Optimize memchr-avx2.S")
- strlen and strnlen, broken by the backport of aaa23c350715 ("x86:
Optimize strlen-avx2.S")
So the issues are fixed, but mostly by chance.
NB: at this stage, I haven't verified the consistency of the ifunc
selectors with ifunc-impl-list.c.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2022-10-04 21:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210419233607.916848-1-goldstein.w.n@gmail.com>
[not found] ` <20210419233607.916848-2-goldstein.w.n@gmail.com>
[not found] ` <YzAO/ictPso/Y5LS@aurel32.net>
[not found] ` <CAFUsyf+U==grKgr9ZivEHDYsj=Xxi0MXBtQDfkU-JBHxb0pq+A@mail.gmail.com>
2022-09-28 13:54 ` Sunil Pandey
2022-09-28 14:02 ` Darren Tristano
2022-09-28 14:42 ` Noah Goldstein
2022-09-28 14:54 ` Sunil Pandey
2022-09-28 15:00 ` Noah Goldstein
2022-09-28 18:24 ` H.J. Lu
2022-09-30 13:19 ` FUCKETY FUCK FUCK FUCK - PLEASE FUCKING REMOVE ME> Darren Tristano
2022-09-28 18:23 ` [PATCH v5 2/2] x86: Optimize strlen-avx2.S H.J. Lu
2022-09-28 19:09 ` Sunil Pandey
2022-09-28 19:23 ` H.J. Lu
2022-09-30 13:19 ` FUCKETY FUCK FUCK FUCK - PLEASE FUCKING REMOVE ME> Darren Tristano
2022-10-04 21:19 ` Aurelien Jarno [this message]
2022-10-04 21:29 ` [PATCH v5 2/2] x86: Optimize strlen-avx2.S H.J. Lu
2022-10-05 1:10 ` Sunil Pandey
2022-10-05 14:23 ` Noah Goldstein
2022-10-05 16:35 ` Sunil Pandey
2022-10-05 17:11 ` Aurelien Jarno
2022-10-05 18:34 ` Sunil Pandey
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=YzyjfhOkGAjWkQfz@aurel32.net \
--to=aurelien@aurel32.net \
--cc=goldstein.w.n@gmail.com \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-stable@sourceware.org \
--cc=skpgkp2@gmail.com \
/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).