From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id AEF6F3858D37 for ; Tue, 29 Nov 2022 22:37:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AEF6F3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ATLo17L010531 for ; Tue, 29 Nov 2022 22:37:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=B1JAstMAiYOM8unSy1xgT6j3DAdROEVt4TZBhO3MVg4=; b=BZD8EmHDhwgyKWxpiQU/0LabYUhYaYR3BiW/dK4k3kwME70xtwzV9LjcaX4u7r5bHn3o yaPZU5udJqx968iINP03IjBxWm3myULs+OEujXNyyuKNw6GRqS3FqhNgvOil2v5bm0tm GiJsxk1V9uSb498t5aJ1EGvZlWGM/jv67ANOcT71EPlLPAREzzA+Py/SXpfKn+01PIwR mELtpxh1o5JZaOLzz2M97yFJs5nx9kFaLzukC2n2xud6aXduv3yRiUyTw7T5GrAjlegS r0oVGF+Gm3KKMWeHpA4yv8jaic3to7bfwAPnKH5LND1bSi0AZAkEFOgYBNnTWHr30+da wQ== Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m5qr1w2gg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 29 Nov 2022 22:37:07 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2ATMa3iC024926 for ; Tue, 29 Nov 2022 22:37:07 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04dal.us.ibm.com with ESMTP id 3m3aea5t46-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 29 Nov 2022 22:37:07 +0000 Received: from smtpav02.dal12v.mail.ibm.com ([9.208.128.128]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2ATMb53T32178466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Nov 2022 22:37:06 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C6EB582B3; Tue, 29 Nov 2022 22:37:05 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41F04582B4; Tue, 29 Nov 2022 22:37:05 +0000 (GMT) Received: from [9.160.77.189] (unknown [9.160.77.189]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 29 Nov 2022 22:37:05 +0000 (GMT) Message-ID: <8071be27-aebe-6f59-5929-ebf4807046c7@linux.ibm.com> Date: Tue, 29 Nov 2022 16:37:04 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH] powerpc64: Remove old strncmp optimization Content-Language: en-US To: Rajalakshmi Srinivasaraghavan , libc-alpha@sourceware.org References: <20221129160257.1947346-1-rajis@linux.ibm.com> From: Paul E Murphy In-Reply-To: <20221129160257.1947346-1-rajis@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-GUID: v-QctAf0j0fDR0qdGUFhFzLwxQkfx0-V X-Proofpoint-ORIG-GUID: v-QctAf0j0fDR0qdGUFhFzLwxQkfx0-V Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-29_13,2022-11-29_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 spamscore=0 adultscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211290135 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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 11/29/22 10:02 AM, Rajalakshmi Srinivasaraghavan via Libc-alpha wrote: > This patch removes the power4 strncmp optimization for powerpc64 and uses > __strncmp_ppc implementation instead. Currently, both power4 and ppc > IFUNC variants result in similar performance. What cpu was used to test performance? I'd be curious if this holds for something like the venerable ppc970. > > Tested on ppc64le with and without --disable-multi-arch flag. > --- > sysdeps/powerpc/powerpc64/multiarch/Makefile | 3 +- > .../powerpc64/multiarch/ifunc-impl-list.c | 2 - > .../powerpc64/multiarch/strncmp-power4.S | 23 -- > sysdeps/powerpc/powerpc64/multiarch/strncmp.c | 3 - > sysdeps/powerpc/powerpc64/power4/strncmp.S | 225 ------------------ > 5 files changed, 1 insertion(+), 255 deletions(-) > delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S > delete mode 100644 sysdeps/powerpc/powerpc64/power4/strncmp.S > > diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile b/sysdeps/powerpc/powerpc64/multiarch/Makefile > index 6f2436b660..ed25e234ba 100644 > --- a/sysdeps/powerpc/powerpc64/multiarch/Makefile > +++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile > @@ -12,8 +12,7 @@ sysdep_routines += memcpy-power8-cached memcpy-power7 memcpy-a2 memcpy-power6 \ > strnlen-power8 strnlen-power7 strnlen-ppc64 \ > strcasecmp-power7 strcasecmp_l-power7 \ > strncase-power7 strncase_l-power7 \ > - strncmp-power8 strncmp-power7 \ > - strncmp-power4 strncmp-ppc64 \ > + strncmp-power8 strncmp-power7 strncmp-ppc64 \ > strchr-power8 strchr-power7 strchr-ppc64 \ > strchrnul-power8 strchrnul-power7 strchrnul-ppc64 \ > strcpy-power8 strcpy-power7 strcpy-ppc64 stpcpy-power8 \ > diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c > index 5a3c7a5886..238f784146 100644 > --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c > +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c > @@ -171,8 +171,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, > __strncmp_power8) > IFUNC_IMPL_ADD (array, i, strncmp, hwcap & PPC_FEATURE_ARCH_2_06, > __strncmp_power7) > - IFUNC_IMPL_ADD (array, i, strncmp, hwcap & PPC_FEATURE_POWER4, > - __strncmp_power4) > IFUNC_IMPL_ADD (array, i, strncmp, 1, > __strncmp_ppc)) > > diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S b/sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S > deleted file mode 100644 > index df6ad6ae9c..0000000000 > --- a/sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S > +++ /dev/null > @@ -1,23 +0,0 @@ > -/* Copyright (C) 2013-2022 Free Software Foundation, Inc. > - This file is part of the GNU C Library. > - > - The GNU C Library is free software; you can redistribute it and/or > - modify it under the terms of the GNU Lesser General Public > - License as published by the Free Software Foundation; either > - version 2.1 of the License, or (at your option) any later version. > - > - The GNU C Library is distributed in the hope that it will be useful, > - but WITHOUT ANY WARRANTY; without even the implied warranty of > - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - Lesser General Public License for more details. > - > - You should have received a copy of the GNU Lesser General Public > - License along with the GNU C Library; if not, see > - . */ > - > -#define STRNCMP __strncmp_power4 > - > -#undef libc_hidden_builtin_def > -#define libc_hidden_builtin_def(name) > - > -#include > diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c > index da3de73c27..7400ed3b9a 100644 > --- a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c > +++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c > @@ -26,7 +26,6 @@ > # include "init-arch.h" > > extern __typeof (strncmp) __strncmp_ppc attribute_hidden; > -extern __typeof (strncmp) __strncmp_power4 attribute_hidden; > extern __typeof (strncmp) __strncmp_power7 attribute_hidden; > extern __typeof (strncmp) __strncmp_power8 attribute_hidden; > # ifdef __LITTLE_ENDIAN__ > @@ -46,7 +45,5 @@ libc_ifunc_redirected (__redirect_strncmp, strncmp, > ? __strncmp_power8 > : (hwcap & PPC_FEATURE_ARCH_2_06) > ? __strncmp_power7 > - : (hwcap & PPC_FEATURE_POWER4) > - ? __strncmp_power4 > : __strncmp_ppc); Minor nit, does the spacing of __strcncmp_ppc need updating here too?