Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5735235rwd; Mon, 5 Jun 2023 07:56:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5s5zcyx8o3V9/1ggT3uZSGml9P18iXY+woyzF2FhYwJx2owlbFpDYDFiOHqQuEuWreoJ/o X-Received: by 2002:a17:902:d487:b0:1ae:9105:10a5 with SMTP id c7-20020a170902d48700b001ae910510a5mr9700234plg.2.1685976969289; Mon, 05 Jun 2023 07:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685976969; cv=none; d=google.com; s=arc-20160816; b=fL62dgJBqpe+xxTUzjtSi034hgKWJZWzY74dq5ncBFZO8sKSagrS0Q/vXa+4UMHXhg GndRtyc1VPFOnxcTIED4G7ORROMsOysQzJ3gh5zwrr1zWJfjDdrWYYtuGS75qEV+cwst d3kZT/Fg26kc9h0Mo5UG8cVmuYXwrxg9+tU1/re2U7GksjjGNvp59lxsMrCL1tkV4AhX rAL3vdlRrGKvcZsnZiz15nr7lY4qqNhGwZvAd+vNT0ZyOqXXsQ0pXoH8Ed7whkg6fcst 1p9rYhBlH3jv7r5rGFP0Fx03SlvlXyF2g49LbGlVaLpUwX99wsMCo4oZTPvY+yTvs94L thZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Yu8yb2dMCQCeQyNY1nsYlHKgfhBjDttjfMXiSlTo35k=; b=JivtbHtkr0x8wVyXuzG+tkLJKkoNWhVeUxbOdAwuMeVOZwNK0hAffrR3Meq5FQ4lRE CaVNjO/2eWFL1c0y0WDNXnerRqK9W9ZYNm73reqIVWgE2ibmAPD8Le9DZkl1hKuTCrgA CNoYd75XGjjq1ZfYoA38OoYcJIb+t7lZtMSB2w0aOEH0x8u3DdHuYe6R5+miqrDGMFgN 6y2SFkS/GdSe7fsDaekCKQe5lPT4jBhWYG6GogqWAnmpZ59UKK8yTN0AT9eAn17hAaek DGPiYk/NKzH0IHTismYrLHtmadPLLZHN/fdm0ZzknebHjnfPHPtEeKxWBo9HnYlVkXx7 nKIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wkeKIqvi; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a170902e88800b001a974fc86casi5750193plg.592.2023.06.05.07.55.55; Mon, 05 Jun 2023 07:56:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wkeKIqvi; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233516AbjFEOoD (ORCPT + 99 others); Mon, 5 Jun 2023 10:44:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232958AbjFEOoC (ORCPT ); Mon, 5 Jun 2023 10:44:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40FA49C; Mon, 5 Jun 2023 07:44:01 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685976239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Yu8yb2dMCQCeQyNY1nsYlHKgfhBjDttjfMXiSlTo35k=; b=wkeKIqvikWtIbmarvgI7c1qD64y8lAjpTFP4POEo8RpT5Gb04ueDK6KMUTImZAfAVK0pmc qmFrbu0vGSxz/MAZ06gBt92VcOWtG1xy09CbvWYSM+5yaMTMaT4bTAIHM3UHCwDZmbkVd1 XfYS9r01Brn9aEqx0ZJNyHyQqoyHQ+rAL5prUG5gdvzSGMDbgUdf5RVoVO2oD2ehtOK+Mi fiY8qadg1nlHpRRuGQAvCIPpNUFQgYlxKblEYbKQuiqUZi5pokF9Cw0I4T5+OzbocpzzIb rlG3Q3H2BuCpbqWKYYvfO+EEukCgLUI5oijxgeQmgm9htCGyoIYv9t78nqHN9A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685976239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Yu8yb2dMCQCeQyNY1nsYlHKgfhBjDttjfMXiSlTo35k=; b=mGTycwY1wOkkE9XanANgMyGs568fQpM7xE3JHTc2pqw/l5dmCPXWcDC0F+HZQmyn1kKYn7 xxlDu0MXR9YM04Dw== To: David Laight , Muhammad Usama Anjum , Jonathan Corbet , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "open list:DOCUMENTATION" , open list , "Guilherme G. Piccoli" Cc: Steven Noonan , "kernel@collabora.com" Subject: RE: Direct rdtsc call side-effect In-Reply-To: <353732783fde46919fdcf698c326b7ed@AcuMS.aculab.com> References: <6719fb05-382c-8ec4-ccda-72798906a54b@collabora.com> <87mt1jeax1.ffs@tglx> <353732783fde46919fdcf698c326b7ed@AcuMS.aculab.com> Date: Mon, 05 Jun 2023 16:43:59 +0200 Message-ID: <87jzwi55qo.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 05 2023 at 10:27, David Laight wrote: > It has to be said that using it as a time source was fundamentally > a bad idea. Too bad you weren't around many moons ago and educated us on that. That would have saved us lots of trouble and work. > Sometimes (eg micro benchmarks) you really want a TSC. > You can extract one from the performance counters, but it is hard, > root only, and the library functions have high and variable overhead. Interesting view that high end databases are considered micro benchmarks which need root access. I'm sure you already talked to the developers of such code how they can elimiate their performance problems when VDSO/TSC time queries are not available. Alternatively you have a replacement implementation to make VDSO work with the same performance and precision based on (potentially non-existing) legacy time sources. There are damned good practical reasons, why we spent a lot of effort to implement VDSO and make TSC usable at least on any modern platform. Micro-benchmarks are definitely not one of those reasons. Thanks, tglx