From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id A53523858D1E for ; Mon, 6 May 2024 14:16:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A53523858D1E 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 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A53523858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715004998; cv=none; b=TXHotw2nHA1IrTMlTp/tb0cMRZO+6u65y6r0PXtbvC7jHAqohl7Z7c8D5vXGwI90/ro23fzGyigy3glY68RBhcowEnYgTqqEZYlYtzIzMaf67tM9+PtNwHihjB1QVhbGZHQvnR7Wonpa7Yhdl4PRY4vuqy5JcHAKbZwx3pix318= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715004998; c=relaxed/simple; bh=GrK1iYcjhG/Xh1mDSBNvzMBH0tUNLhxa0d7g3rt5slA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=IjBTCIUcitrNSUMtv9i0JCK2yxUi47s3ZabmmbcGQ1nRYHnCSw4KCpxHtrXSQO8hwVUJWZ42+eTcUfHglUczq/vyjvo4PnMuG+EtNWidfMcapCALmOBRSzYxBoDx1rY6Yghve52Uu631qg73TpxIjz0ljXASri1BCaSFw+vIU/4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 446DpApE017011; Mon, 6 May 2024 14:16:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=WHJNdntZxYKr1ut0k0iz6pOMG+/jIuYzTG4lXpw+o+I=; b=VQwjLbFAgoo4UUhBqEqcim1znJrVVr3cScalQALYbDknuBbDo3AnZ5tSmjUQMj4WsBQ/ vaszkAUDm7Vubtu2gabl1Pj5GkkriLkuYoyjznfQx4UikT/jc1sj30mqAdjLtBVcBEmq ooUy6fRpSHcOdhCiKNhEs5NfwMajF6mxVMV6hyfV5C1b0FCR1Opv9KUZancU03lAaFOk +qUWpp4Czexttbk7AmnoeupP/x3DR8AF5qeNUrYJffxxOAqK51tmh54Zqh/Oo1ufVS2B KkXd7ukc879MV9/IRZik6fCiSsJ7z2EmzqOCWdRBkg3QeO4pcZpdtDzLzUorNy6UvgbH jw== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xxyca09ev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 14:16:34 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 446BdS0G030859; Mon, 6 May 2024 14:16:33 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([172.16.1.73]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xwybtrjj5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 14:16:33 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 446EGUrW26739268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 May 2024 14:16:32 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 055FA58056; Mon, 6 May 2024 14:16:30 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9AE7458052; Mon, 6 May 2024 14:16:29 +0000 (GMT) Received: from [9.61.161.194] (unknown [9.61.161.194]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 May 2024 14:16:29 +0000 (GMT) Message-ID: Date: Mon, 6 May 2024 09:16:29 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [V3] powerpc: Optimized strncmp for power10 To: Adhemerval Zanella Netto , Amrita H S Cc: libc-alpha@sourceware.org, Paul E Murphy References: <20240429095847.3541150-1-amritahs@linux.vnet.ibm.com> <63ec70c8-f522-4ad7-bb01-6a179bf61ac4@linaro.org> Content-Language: en-US From: Peter Bergner In-Reply-To: <63ec70c8-f522-4ad7-bb01-6a179bf61ac4@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: VPsdhvhYAcd7v5nzDpqRPvt06BHxX_bo X-Proofpoint-GUID: VPsdhvhYAcd7v5nzDpqRPvt06BHxX_bo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_08,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=727 clxscore=1015 priorityscore=1501 impostorscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405060098 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 5/6/24 8:04 AM, Adhemerval Zanella Netto wrote: > If I recall correctly it was to not tie the implementation to an specific > page size, since the ABI still allows 4k page sizes. I think both branches > will highly unlikely to be taken, so branch prediction will most likely > get a high frequency hit. Even though the hardware supports 4K pages, I thought we never built it that way and the major distros to build it with 64K pages, but I learned there are some minor distros the use 4K pages, so I agree we should use that here. > We can also try to make it dynamically if you think these checks are really > costly, this will mean to add two extra loads and possible an extra cache > like hit (one for GLRO struct, another for dl_pagesize). I don't think this > is worth. I don't know that they costly, I just though that if they're useless because we always use 64K pages, then it seems dumb to check the 4K boundary. Since can/might have 4K pages, then the patch code is correct as is. > Another question is whether this tests still make sense for POWER10, is it > still that costly for cross page-page reads as for POWER8? I'm not 100% sure and it would be something we'd need to test, but I suspect it probably hasn't changed too much??? Peter