From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43810 invoked by alias); 18 Oct 2019 15:50:25 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 43798 invoked by uid 89); 18 Oct 2019 15:50:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: EUR02-AM5-obe.outbound.protection.outlook.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+7GZcSGkH6qiKupZpJY3/VE8rJk7Wote4gzAPBH8e84=; b=D/KhwEstWZeHS5wxX6RzMxrd3AuQNLtIJ1SMZaBRbpvdQEUabPr/RYYJ4cP1ybNBg0IQlSZ6DTtOMqy0NJbPBkXlgwRfv30iPYx3NIiefNr/mU/3xRTbmk85d99ASf8D8FkMlAbTZ/GuyuOel8KAm5g+ecSmY5mr8ha70Hc9iLE= Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=none action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-CheckRecipientChecked: true X-CR-MTA-CID: 995bd1d79e245d02 X-CR-MTA-TID: 64aa7808 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HcbthNeiRFtwl02LYQrV1nl6Sa9FmBGQq9uQJ+6STaXLTGFJqhXkJwpD5j/GLpDZAYtmHfoeuzDIWgUWxWR6mk75RZje5UZE64ei98xDD/uzTtWHhoaoKA2LjV1PcjMIgztUpCP3YnhZjIK8PcWFOLiR4fu/BTRBQt1mBjVD5UC2HMb7b6yL7yDhrjrW5LeymzXj5vzOpp+WXzL3Ddclm33xz1UIiZlcOD1VFTYF2geyKoJOKSAd41rFixY37qg73CxcjvLvmbn4ssYSD/N/MTjGeH460dnPRPT7oNsCWjC03hP4Rq9eN3TwX9EEuJm168dwAgGWSSeTbC0UiYCZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+7GZcSGkH6qiKupZpJY3/VE8rJk7Wote4gzAPBH8e84=; b=SVROQXQqVQfWGt0UEyPG58g+T9Nw9SaPg0eSW4a27X6W6tNISzi0CWNVJui/K8GTgZg5c0jYLBhbTmoPryGib4YOVkW9OJfsT4gLxOCVenjghvjWu/V7NkVnmkBWERCWlL4A2gM7XLql0IqS40CaW2kAWWfrmUIZFtWSvGPe0XSV8IQAsum5l5yqpO7RAfIr/JZsnv9UCBHeq1672bYX7hmbewM/6ARtrHp3IhYZc+dnwN1GiccmgO83yqdNaNWPCGzlfSRZxgRC4H8T8WJiWObgzrN+ZS3OC6N2nU835PMYUbjs1IE+DY4fzR9+3R+roXuNuTCx+8d67jE7pKiBjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+7GZcSGkH6qiKupZpJY3/VE8rJk7Wote4gzAPBH8e84=; b=D/KhwEstWZeHS5wxX6RzMxrd3AuQNLtIJ1SMZaBRbpvdQEUabPr/RYYJ4cP1ybNBg0IQlSZ6DTtOMqy0NJbPBkXlgwRfv30iPYx3NIiefNr/mU/3xRTbmk85d99ASf8D8FkMlAbTZ/GuyuOel8KAm5g+ecSmY5mr8ha70Hc9iLE= From: Wilco Dijkstra To: Yikun Jiang , Xuelei Zhang CC: "libc-alpha@sourceware.org" , nd , Siddhesh Poyarekar , "jiangyikun@huawei.com" , Szabolcs Nagy Subject: Re: [PATCH v2 2/2] aarch64: Optimized memcpy and memmove for Kunpeng processor Date: Fri, 18 Oct 2019 15:50:00 -0000 Message-ID: References: <20191017131548.10808-1-zhangxuelei4@huawei.com>, In-Reply-To: Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-exchange-transport-forked: True x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(346002)(136003)(366004)(376002)(396003)(39860400002)(189003)(199004)(110136005)(71200400001)(71190400001)(86362001)(55016002)(5660300002)(478600001)(33656002)(6436002)(66446008)(64756008)(76116006)(305945005)(74316002)(7736002)(14454004)(256004)(54906003)(81156014)(81166006)(6246003)(52536014)(66946007)(316002)(9686003)(8936002)(8676002)(229853002)(66476007)(66556008)(25786009)(99286004)(7696005)(76176011)(2906002)(4326008)(6116002)(3846002)(486006)(11346002)(26005)(446003)(476003)(66066001)(186003)(6506007)(102836004);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0801MB1999;H:VI1PR0801MB2127.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: FVpoxm/1vXqh9mWM81ypz1BpvBM5OEicdS0BIVR9uEUsWk3UQ8OWocvjKM2Xac5gIS7AL4yA73EAPVWc4FD/hq/ytr+rw9A9w4U9g0ObRU1W9XFy44ZH+qQcGbZk/kZTYVICmbyY0iC3jBlOl9JwKlXfFSesNEf0b4EOP/9bUKPLg/3cHRi8jkaOT4g/iDdPh5dHKdvH375zXnALjb370ip/FqSxy+doFuHLq7gbVHLyW5w5l9SUTw55rJYAjXd+6CHiTf/oAzotvWbNxu4UOAiJxRpnB+IUzCav6YYPQOcHxQhEjgo/n+mCoi/soPPWiQDOZPb/5ctNcf3pJoIQeovxUI8aUwPVCKpP9el34n5xuo3xxV1MKhpJ6H1Z4NfGKH4x4kqew0TWNAe+wrixdyPKFWSsHW4bCEl8wWaR69E= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; Return-Path: Wilco.Dijkstra@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4091406c-0eaa-4032-ca89-08d753e2d9d0 X-SW-Source: 2019-10/txt/msg00574.txt.bz2 Hi Yikun, >> Btw do you have any plans to post other string functions that you can di= scuss here? If so, would these >> add more ifuncs or improve the generic versions? > > Yes, memcmp, strlen, strnlen, strcpy, memrchr will be included, we will s= ummited the patch and test results as soon as possible. > >We have submitted the patches of string functions, see below: Thanks, that makes it easier to discuss in more detail. So in almost all ca= ses these patches add new ifuncs. There are general issues with ifuncs which make add= ing lots of similar ifuncs a bad idea. The key problem is that ifuncs are not u= sed inside GLIBC itself. For example the strstr implementation benefits from a fast me= mcmp but it always uses the generic memcmp, so it won't get any gains from the K= unpeng optimized one. So this makes it highly desirable to improve the generic versions of string= functions. >From what I see, all of the changes are fairly simple and generic improvem= ents, so can be done easily to the generic versions. I think it would be a very bad = idea to add lots of ifunc variants which are almost identical to existing versions and = differ in minor details like unrolling. For example strlen and memcmp add unrolling to existing code. Note that mem= chr_strlen significantly outperforms the fastest strlen on sizes larger than 256, so I= don't think that using uminv to test for zeroes is the fastest approach. Cheers, Wilco