From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80128.outbound.protection.outlook.com [40.107.8.128]) by sourceware.org (Postfix) with ESMTPS id 877743857421 for ; Wed, 30 Jun 2021 13:27:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 877743857421 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DaY1Fx9hQLBQ+FvptaV3+eldUue9a9bEgJuS+CKpJ8QVxgD6BFSCKhnb2azemtRWivcCw7p+xDHKgy56bU26FgLVSzrwA4DtiHICLjAAz+Bc+NFMb/YAe30CdR3RXlgSOCChUKNlh//Uf3mAAKOr3t7sBOUIstYK5JsbBLlsA2c96bpMT9pBNl5RPmAoFdExzALsdKkNaL7KeJf+4FxdeTqzVHFq35VSiadC712LDBjcfTC/Ospn3+J+Mw45uw9FkLX5N4l9KTWkxZNzZ4wVydNIaI41Lo+3lKAHKHmgs+e/8hruUD7Xon5GQeRMT7ka7mmC4J4B83SPrWjNusdFZQ== 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=FFFFUBDx/daWe6ZnGOJ69D0nQY3AnhMknzl6Ex9XjpI=; b=LlQHaNQTIfHXFWHaEg/s4IxJIN9SpFNS75Q/j4QelamMHSLBkKLdVbJSwjL0UH2+s6iAXv/hbUHfSwSCmUYnqiF3kLfRF2V41O+5+eBsLn0VSzT26a9Gd+4a8eEImKe12FAMzsw9SqOH9JMGigR/Qxap+uQJbf1uda4TdK9dwYS5DFJVLka7WEm2foVpbXPwNLpYvsPm01vYJzUfFYvhTa0cxMWwKRNiU6ueU4KHYehf+ldJSinnLTnz4KiCGLGG2szBMIgdFnTN775xWxyW+O1+pZ3amF9S8LVy0EMfXB7Yid7LMsHwnsKSeZnWgD2DrrT4rC84SifycTcXh8dFTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=asml.com; dmarc=pass action=none header.from=asml.com; dkim=pass header.d=asml.com; arc=none Received: from AM4PR0201MB2227.eurprd02.prod.outlook.com (2603:10a6:200:4c::22) by AM0PR02MB3971.eurprd02.prod.outlook.com (2603:10a6:208:d3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Wed, 30 Jun 2021 13:27:38 +0000 Received: from AM4PR0201MB2227.eurprd02.prod.outlook.com ([fe80::a964:7952:6973:50c7]) by AM4PR0201MB2227.eurprd02.prod.outlook.com ([fe80::a964:7952:6973:50c7%5]) with mapi id 15.20.4242.025; Wed, 30 Jun 2021 13:27:38 +0000 From: Rafael Eduardo Ruviaro Christ To: Wilco Dijkstra , 'GNU C Library' Subject: RE: aarch64 lacks HP_TIMING support in glibc Thread-Topic: aarch64 lacks HP_TIMING support in glibc Thread-Index: AQHXaBukks+y5M9jU0SSPU2TbCh2TqspmVqggAA6l1eAAl/ckA== Date: Wed, 30 Jun 2021 13:27:38 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [94.157.93.114] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3b64e551-40f7-45e0-e0db-08d93bcad4a5 x-ms-traffictypediagnostic: AM0PR02MB3971: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: incyHqMCNQil4fSs4N8GUYoyIf2XblcLPLKje+/nlx4QmjL+4uLFbPwHMMhoghd5MiaGfdQgeWr8tSXVfYjgvrCwLrtr5ZMTmQg/pk78Qh20yW29FqeIkxuRCnXP4ekjmBNdVRD3hJRTQBQDkb17N9tUN2IjO9TOvOAhDV1lGYG+3dqwjAz017VaD5CdD35USdudI7sMktTp1VWSPQlQjN+cWOHvN3owUmZw3kwrI3XLCLXikCAWhhiiAPR/ulLAIORDRdaHoCsS9EiO0iNMgnjuq056j+OFDXmnO7rvhlZ9ByJAdw9lP/GGiUNKcrWvrTu2++bU/6vzFKeMuD0h7y0zZXQeMyeA1VNU0W1EdlyO6oaZdQns6CL69U+xgDwsMZ26H6iLZuX+fDSuwe6i4s7vuFBn5cjpd9km8mBkZucmGMYzkWD9STXmqMJe7Gex9OCjLyxYIwSXqsAB/O5rzPgcmczFC5K6bSQC9PP5vpWQSbiRhACeHT7QwG39O3XYYok4uilFhgE3LJ2FYsRyd862wYZdy9QUZjmX8rJivB64RmSU/j8dBffe/x0dljU06KIXu5EghkLiParlhds0Dmuaw/FqoQQCJp1Nr+u3cxGmrTIS4+KTzNR/zMt9x07+5gjWVEn7iBPB5xLNwjCYHA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM4PR0201MB2227.eurprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(376002)(396003)(366004)(346002)(86362001)(26005)(2906002)(8936002)(53546011)(7696005)(71200400001)(186003)(6506007)(83380400001)(110136005)(76116006)(5660300002)(55016002)(316002)(33656002)(38100700002)(9686003)(52536014)(9326002)(122000001)(66446008)(64756008)(66556008)(66476007)(478600001)(66946007)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ug1VsRfwHInE3lbWJJRzH6CUTfWy3pbjODe+SGX2SMrCQdgIrHaDYn19mTRX?= =?us-ascii?Q?Q5xTl+Ok4ggHAOecoltRjL0YCD7cAC3ZMZ2ETaGzK3NDUywvX7KUgsGm9ouu?= =?us-ascii?Q?qqRsxYTa44e/aulEh8zzd+0HxukJ/ad3YVEV4WkEhtXeJqlb4SSTTbLqs4Aw?= =?us-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D7SGW0B6y42xQ3NnEkvwOl/OZi+4?= =?us-ascii?Q?GvtjIhghIXjTJkCvO7VT6Nb+1PvOc5f2M5LtXXUJbMYx7aq8rJzA0Z7aKcQt?= =?us-ascii?Q?A28edNPh9cCmXEp4OhwygXQvsl2RwClIsZy798hpVgBKByqUKToTYFsdebwi?= =?us-ascii?Q?BsUD/F4CMuFUVaru7LQPVe7KgDYIxuRPVeTYVlfnQZ7w6lwAi/BuijCSgxRl?= =?us-ascii?Q?NLyKGCmG6FqNyGtiUG2fqMdpKrsHhuRADqxoyK+/Ba0G1KJjpkQAkjOHLju2?= =?us-ascii?Q?nTkdH79gVjIBOGJ3Qc57ppIm?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: asml.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM4PR0201MB2227.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b64e551-40f7-45e0-e0db-08d93bcad4a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2021 13:27:38.5809 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: af73baa8-f594-4eb2-a39d-93e96cad61fc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oT3L2fSKHbJsD/1ADoCNCc42/dq1eXk8FBgsHla0wWYbSQmhRXe2WX42JP5Zu2VWVds7n8yxO3XCWgGcvaGj8TUIUcaF4Ao7mzpF0pVAc+ViYY8/WDb4uyuvsm1lQRQS X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR02MB3971 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_FONT_LOW_CONTRAST, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Wed, 30 Jun 2021 13:27:43 -0000 Hi Wilco, The function clock_getres returns hardcoded 1ns if platform has high-resolu= tion timers, instead of the actual resolution based on clock frequency. Acc= ording to linux/include/linux/hrtimer.h: /* * The resolution of the clocks. The resolution value is returned in * the clock_getres() system call to give application programmers an * idea of the (in)accuracy of timers. Timer values are rounded up to * this resolution values. */ # define HIGH_RES_NSEC 1 We consider this a bad design, but the Linux kernel community has decided t= hat it meets their needs and have therefore not pursued any new implementat= ion to return the real resolution. For instance, if system clock is 25MHz,= correct resolution should be 40ns. I cannot patch the kernel because it is considered internally to risky. I w= as hoping to fix this in user space. For AArch64, it is possible to retrieve the system clock frequency: asm volatile("mrs %0, cntfrq_el0" : "=3Dr" (freq)); The ideal would be to implement the solution in glibc. What do you think Wilco? Kind regards, Rafael From: Wilco Dijkstra Sent: Monday, June 28, 2021 9:25 PM To: Rafael Eduardo Ruviaro Christ ; '= GNU C Library' Subject: Re: aarch64 lacks HP_TIMING support in glibc CAUTION: This message is from an external sender Hi Rafael, > Thank you for your message. Currently, we're using glibc 2.28. As soon as= I am able to > update to the latest glibc I will repeat the tests in our platform to eva= luate the > clock_getres() behavior. I don't believe there has been any change in behaviour since 2.28 - clock_g= etres does not use hp-timing in any way (and never did on AArch64). So is there something = specific that you have an issue with? Cheers, Wilco -- The information contained in this communication and any attachments is c= onfidential and may be privileged, and is for the sole use of the intended = recipient(s). Any unauthorized review, use, disclosure or distribution is p= rohibited. Unless explicitly stated otherwise in the body of this communica= tion or the attachment thereto (if any), the information is provided on an = AS-IS basis without any express or implied warranties or liabilities. To th= e extent you are relying on this information, you are doing so at your own = risk. If you are not the intended recipient, please notify the sender immed= iately by replying to this message and destroy all copies of this message a= nd any attachments. Neither the sender nor the company/group of companies h= e or she represents shall be liable for the proper and complete transmissio= n of the information contained in this communication, or for any delay in i= ts receipt.