From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by sourceware.org (Postfix) with ESMTPS id 18530385828D; Tue, 4 Oct 2022 21:20:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 18530385828D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=aurel32.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=aurel32.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=atzQuxLWpS9y0UMPi5vV9sTXtE1hi+G1n+Kda5QfhqU=; b=ZrXkfln1h3KhDLo3pb7TQ8oC38 zE2YnyfbUcOlcjk4NNy5wRbitcamk24nkd5PjccyhVV2pllvX3NcviQKpxMJSzHzfU92WOhtpWY5B Wx1Q84ru6iIBz3qmHJJuOwLI8bLJmnVMdrPQpDlwgsDoGCULAP2we20Nw9xkGM37ydvJS3KqRNj3w /6shMwyij+OQ7VXJBFsWfN855h9vBDZIPxE7iKEOCzTb4j50D5BDBGB0zaZg6QUOhWNUUIxhhi4nz cz0DW0PCdJpqOlPbOJpooVHcxtLTElQQZTLmPcRZRHRrhj3rN7ilM3is9L4eyTXjppIGnww8GW4c6 WZSj6atg==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ofpKY-00H38g-Vk; Tue, 04 Oct 2022 23:19:58 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.96) (envelope-from ) id 1ofpKY-005ZSt-0N; Tue, 04 Oct 2022 23:19:58 +0200 Date: Tue, 4 Oct 2022 23:19:58 +0200 From: Aurelien Jarno To: Sunil Pandey Cc: Noah Goldstein , Libc-stable Mailing List , Hongjiu Lu , GNU C Library Subject: Re: [PATCH v5 2/2] x86: Optimize strlen-avx2.S Message-ID: Mail-Followup-To: Sunil Pandey , Noah Goldstein , Libc-stable Mailing List , Hongjiu Lu , GNU C Library References: <20210419233607.916848-1-goldstein.w.n@gmail.com> <20210419233607.916848-2-goldstein.w.n@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.7 (2022-08-07) X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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" > 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 > 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