From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60084.outbound.protection.outlook.com [40.107.6.84]) by sourceware.org (Postfix) with ESMTPS id 87F353858C3A for ; Tue, 21 Sep 2021 11:09:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 87F353858C3A Received: from AM5PR0701CA0060.eurprd07.prod.outlook.com (2603:10a6:203:2::22) by VI1PR0801MB2126.eurprd08.prod.outlook.com (2603:10a6:800:51::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Tue, 21 Sep 2021 11:09:20 +0000 Received: from AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:2:cafe::e1) by AM5PR0701CA0060.outlook.office365.com (2603:10a6:203:2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.5 via Frontend Transport; Tue, 21 Sep 2021 11:09:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.33.187.114) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.33.187.114 as permitted sender) receiver=protection.outlook.com; client-ip=63.33.187.114; helo=64aa7808-outbound-2.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-2.mta.getcheckrecipient.com (63.33.187.114) by AM5EUR03FT055.mail.protection.outlook.com (10.152.17.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Tue, 21 Sep 2021 11:09:19 +0000 Received: ("Tessian outbound 1fd2edb24cb2:v103"); Tue, 21 Sep 2021 11:09:17 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d857338cca5eafae X-CR-MTA-TID: 64aa7808 Received: from ce8f449c9301.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D2A63C15-EF14-4057-8CA7-EB7C192F4D66.1; Tue, 21 Sep 2021 11:09:06 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ce8f449c9301.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 21 Sep 2021 11:09:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=biUT4lk5ZV2wjZO61hyJfTiW1CnjE4ITciEcM268SceOr/LYWYdfY+g6GuAQ9dGxFO//FQT98SZ1GBDoO6EfgFE9LZFfbjIwGK3fezLXN7HPhgtsL/5GvvmKRvMh98Ibg2zVPTWFK/l09dCzKcGfPX7LzryD5TFePEMGf5C45vDQGOIwirQGZMrr6dFzzhu0WVjzDyuCoAwo+iBSjbIDP9qDs6RbOooFFxTOGtxZr2ypVTWuhjACZ+IupkLbWcnEdZwEb/jc+XZAHdWkoWVU5R0aazqgK/VJwSCEuhTxLgIAf/R8VUyFd5tBj3h9tZ9aM0psvmb2Pj1tc7pZ8FSVBg== 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; bh=Ljg6m1vVmqbJzcKcZrkkMMJljyOxC4aWs+9GvVcAzxg=; b=PRac5wEkkjHOnsmAkfTnew52eQnrazBDS3m8K1KawY/I6WxqZAhQrNuiNNLOyp243nrdRe5m3LNruA64o+TxepHfuarbpQMXBK3nDuamcg1ZsyQVmiBrYp28AN3MwbQIFQAscmNEsnjQc1ZZgUQoG9JbzxhguxpwKBT7d70AgTkLjc1ZLsnL9RLQrVB/qZeN2QilOL51CbQGvVXuR54PryTDt3pp0MQQ8xtJMd3qxc/LIZO/zorbox0KqfuCxw4Dw/4GQHQqjDbfdxMhxYhG2VfgvtrDUVvfyI/s7SgnJ28oksptqrE21zBrP325ucB7ncDYfiIHg9G51ncpXMpy/A== 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 Received: from VE1PR08MB5599.eurprd08.prod.outlook.com (2603:10a6:800:1a1::12) by VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:89::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.18; Tue, 21 Sep 2021 11:09:05 +0000 Received: from VE1PR08MB5599.eurprd08.prod.outlook.com ([fe80::281b:cded:83ff:1856]) by VE1PR08MB5599.eurprd08.prod.outlook.com ([fe80::281b:cded:83ff:1856%3]) with mapi id 15.20.4523.018; Tue, 21 Sep 2021 11:09:05 +0000 From: Wilco Dijkstra To: "naohirot@fujitsu.com" , "'Lucas A. M. Magalhaes'" , Noah Goldstein , "libc-alpha@sourceware.org" Subject: Re: [PATCH v3 2/5] benchtests: Add memset zero fill benchtest Thread-Topic: [PATCH v3 2/5] benchtests: Add memset zero fill benchtest Thread-Index: AQHXic6pwUgGMr/M+EiJzJ1juupCWaud9IkAgANrWQCAAN0/AIAAsoyAgADZ4peAATkoAIAI+UeAgACYzWQ= Date: Tue, 21 Sep 2021 11:09:05 +0000 Message-ID: References: <20210805074733.433430-1-naohirot@fujitsu.com> <20210805075053.433538-1-naohirot@fujitsu.com> <163130642274.404689.6991051609396665932@localhost.localdomain> <163154191414.705584.12050866556951422556@localhost.localdomain> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Enabled=True; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_SiteId=a19f121d-81e1-4858-a9d8-736e267fd4c7; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_SetDate=2021-09-15T08:24:55.298Z; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Name=FUJITSU-RESTRICTED; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_ContentBits=0; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Method=Standard; Authentication-Results-Original: fujitsu.com; dkim=none (message not signed) header.d=none;fujitsu.com; dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 4b080d88-7f64-4ba9-08a1-08d97cf0424c x-ms-traffictypediagnostic: VI1PR0801MB1998:|VI1PR0801MB2126: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: uJI+70ATFXFnCuC5CqALMiDQ/9lootOni8iXT8jqnP+MH+2G/DI45gOt39HF6LEYnsTaPtj52ejeXPJmh52K4m2PQNzvZOAKg2XX8eqY4AfKAzxZkysMUcNlLwx6644pxu3nWN1CwZpDrNCrx8Lyqefp2gQE38DzSaEfeDF7+5oBaqTEUa3a3sPOct8sidvHQ8/OK8b6dbZFXiDSe2pF15Dr9BKvd+Wgj/l7HJ3jTXQnCdtVdHK1Q4ZwGbMm1OJrIHhDP+xv7uwvFvIJGM8Iy8vNJ+zJvFuz5/IEPWSulkoblBbSbvNQ9U0hYDdbKmG8VRfMLylZ4+zE3Tt1ZcmPpFccmhOKXlK+2jt5EuSFP5jo1MCyI9stZKrpucF1AJCXgDHeoIQ5MpflRf/Jd7ZwefkSySPl61eEBBxbbfSHvQ6RoEn+gdxLfFqSeEGLJog1cEcylDIDAbdT2J6AQ44uXFOEOakhDjjjZMHaeHUsCVGmdSOx5fC7kmkj16LqA6hXTDTb56GF3zLIVt1iI7ZJtjY0qiz52zkp5Sv3Zx92W+ibrpDeteg5CBHpprevKwGtHx9o09zCO+hqZABGr8XN/65OGxeCVfQ74o47S2nzWjJlMPb4jdu0XpYVxYZKYUj+hgbV3/jzvMZugcy2sp9FTMi+iDUOs8jUnT6TmulbN1VLiiIvv1QmCzwutzn/wA5LYtzZDviv7gcDSfblJLKH3w== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB5599.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38100700002)(66446008)(186003)(33656002)(8936002)(9686003)(7696005)(66946007)(2906002)(38070700005)(76116006)(26005)(110136005)(86362001)(4744005)(316002)(52536014)(5660300002)(6506007)(55016002)(508600001)(64756008)(66556008)(8676002)(71200400001)(122000001)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1998 Original-Authentication-Results: fujitsu.com; dkim=none (message not signed) header.d=none;fujitsu.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 628c3443-d9dd-4df2-bd00-08d97cf039cf X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RjsXpv8M4aaDNgj9Qqi52vBqxhgBBM2LzuR2eTRiJMVf75HnWQMpLtE9Vomh2MF7dy+yoAzAqNoq35Sk0v9wIUyg/jxtFL8tGM3SzyzQlJfyQZHjsE4r/v4EyZJ3nW8/4nu8MZivopjSlVuaBGrnVDDQGreHqcSz8AdaXS8vNZGfbTATi5ZIpn6yTD4UkTPHs42FTOUAxMskO5ndR5hFFv0+3WH/Yaj0ynZZVAMXx0l/Gi+K+WjkgOzqRyJqbNozTlfC3a2r3AEqj96EZH8ysCoCpNQPUx56F25Zarw6UyBgzjbWPuW/+vREB26lZudgIf9SmP+myb6xH0Fk2c9HXKNymsT05CTyZEHEAB9fhZNbF7vstPim0Pn5AiA9FgOpSoMOtBClZGD5huaaeQQDDUY9KCYPsedv3NZT+b1tMUApZYqlULuoAszqzLskkfqXrQaTYy3oVovbBsSwmugzFhMXpIpYP9/tPk4896gojl0CJS1VdUq01zwnlxxt9sH4x25OeuSeN/hiDe6tFRWLLEzagxNJmMEP9RMhXH7LHB0BiUVJjjIwDfZG6HzLoX2KjzMdnXYBfBJ8+GTeXT/pOkitRJucT7bJ6aaO+3bSg4HB9ELvig61zcJ5JpOKTE+jXSIjlXn19GpNFww38ACstzfweZAfn7YMnj64QJamrPGJ6UoflQotLBFU2i2ZSh6AEl0rgBSemyCHh7NlqUhO5w== X-Forefront-Antispam-Report: CIP:63.33.187.114; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-2.mta.getcheckrecipient.com; PTR:ec2-63-33-187-114.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(2906002)(8936002)(5660300002)(356005)(70206006)(336012)(508600001)(70586007)(186003)(81166007)(36860700001)(33656002)(4744005)(55016002)(47076005)(26005)(316002)(52536014)(86362001)(6506007)(82310400003)(8676002)(7696005)(9686003)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2021 11:09:19.5280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b080d88-7f64-4ba9-08a1-08d97cf0424c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.33.187.114]; Helo=[64aa7808-outbound-2.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2126 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2021 11:09:26 -0000 Hi Naohiro,=0A= =0A= > In terms of the start size, 256B is chosen because __memset_generic=0A= > (sysdeps/aarch64/memset.S) calls DC ZVA for zero fill from 256B, which=0A= > code you committed [1].=0A= > And I reported an interesting insight in the mail [2] that DC ZVA is=0A= > slower than store instruction from 256B to 16KB on A64FX [3].=0A= > So it seems valuable to measure the range from 256B to 16KB to see=0A= > each CPU's behavior.=0A= > What do you think?=0A= =0A= As I've mentioned, this will never work using the current benchmark loop.= =0A= At size 256 your loop has only 1 timer tick... The only way to get any data= =0A= out is to increase the time taken per call. At 16K there are about 20 ticks= so=0A= it is still very inaccurate. By repeating the test thousands of times you c= an=0A= some signal out (eg. 20% is 20 ticks, 80% is 21 gives ~20.8 ticks on averag= e),=0A= but that's impossible for smaller sizes.=0A= =0A= So if you want to measure small sizes, you need to use a more accurate timi= ng=0A= loop.=0A= =0A= Cheers,=0A= Wilco=