Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3538594rdh; Mon, 27 Nov 2023 17:40:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJAizLfs9Hbg8c5CL4Jzn31NlekA+o075LyVcLm+sXNdnfwOmjs4XYvQVbYsfp3yG3CdzO X-Received: by 2002:a17:903:25d1:b0:1cf:5782:7c74 with SMTP id jc17-20020a17090325d100b001cf57827c74mr11202905plb.7.1701135623336; Mon, 27 Nov 2023 17:40:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701135623; cv=none; d=google.com; s=arc-20160816; b=JMV29ghbCi5o5A0ID4Kk/J02lcGvpW1sqWHjxMVax0i7OmZK4nJdXyNrT0lOu5E86t wEp9hwD1k409LQbcGon/WTihf4GOe7XeUEYnFY3oX6RopECQPOz+CGTn02UXdnEkcJwd TAG4Vx71yj9xbjgAN94gs5j++FSrhjb3eoEE9KwK/DLwZ2nrJB7oIw9gd0SwxEEnVeMC Qu3gaF6rB9VazwscWOn0L5axVf9E7oE5yEwINjuyrdshbAn1DfCTSiErLa+Gqj420diZ Pn64OYDEdj0VjjW4SkcBe1nfvTCTTb7S2FKoUNx7zarY0kVCIRcLaHllDc3Phu/sr+kG rnBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=lOpyTzm9P3gTeYTGPQgTPqDB9u4nH8TGHyQelfQ2zoQ=; fh=D+Gn6UjTHQz8g5RnF+vH5AJdi+ZPZBFa/jSu/06axsE=; b=sbkwvEhg8vit4lEX7BgkZgU+D/999fdyOMSsFXBMA7q1Edg2XoF8Xvf4SCUSrLZa9g XDEfAwgHoDiLCp8zPioWSUXqzim30EGTSXB+Xd/CtItjJluYLjfsDDPLjU1ARb9rb7X2 og849nQ+FGbjPoA6GzHoE3dTUgnoFYBGYPFoUCX03tnAQc8ilZt+yhu3lVScMyiUkoBn 4apURvACAQUbb7kSo6EoGWmkIVJvGWxwJU9hPlg8MdUd+3CpgHD4wuaWx8LxNrWrV0HJ 22eKONoRw1fXV6XRBJpUiAqMVDZkGeJBcaYAzEx+BsJ6bNaBsRw7ZWgv5p00dgban04P Cn0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id u1-20020a17090341c100b001cfcd31448fsi3721798ple.581.2023.11.27.17.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 17:40:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 30AA3818FBF5; Mon, 27 Nov 2023 17:40:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234276AbjK1BkE convert rfc822-to-8bit (ORCPT + 99 others); Mon, 27 Nov 2023 20:40:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231410AbjK1BkC (ORCPT ); Mon, 27 Nov 2023 20:40:02 -0500 Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2907BD; Mon, 27 Nov 2023 17:40:08 -0800 (PST) Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-1fa37df6da8so1186082fac.2; Mon, 27 Nov 2023 17:40:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701135608; x=1701740408; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9KMijVoZzKjmnAsmxupu7gb2DhrWpe//b9T4lGH4FwY=; b=jExPtyAWDITjC35tZOtKw0MnzoBfV4eroRXZYXcJVnBUOvUjeR/UEdCI7jjxj7ViWZ KZOmEK2nS0RwzyH45TYzB/BYQv7mJQd+XUV8QyEHx9qfrRsXPb05rD/7NbD5dKZDJNP9 pm0rDB+g296vpV/LkjoiGL77cEPmxVMuBCmv3eZOGcy8qfIFbHXbwp0u+7yKla4ZQrY8 bbkNXdw273rL+Ynie7JwpqDMRwLDiJdDhROXfQ8iE92sHQTq825uML3W4kIKQsx1YgHr v8mrwL6oCSv0NwVrMg2iY/t4qFqQslmDljGYYXClk6TttpNQjuxbgkLWEzdbs5bhf+uU 0VFw== X-Gm-Message-State: AOJu0Yx8cAsGw7Y7aIhNDKJc9w1VXyl+370TK8UrYsQhJGIBJIk2bUoD yJ0Amj6RVh3eR4dZELabPm/dWYQyi+zE+RRrDuOaOnpftPE= X-Received: by 2002:a05:6870:5a8b:b0:1f0:8122:554c with SMTP id dt11-20020a0568705a8b00b001f08122554cmr13274814oab.45.1701135608186; Mon, 27 Nov 2023 17:40:08 -0800 (PST) MIME-Version: 1.0 References: <002801da0da1$adb83fc0$0928bf40$@telus.net> In-Reply-To: <002801da0da1$adb83fc0$0928bf40$@telus.net> From: Len Brown Date: Mon, 27 Nov 2023 20:39:57 -0500 Message-ID: Subject: Re: [PATCH] tools/power turbostat: Fix Bzy_MHz calculation equation To: Doug Smythies Cc: Peng Liu , Wyes Karny , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, liupeng17@lenovo.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 17:40:20 -0800 (PST) Peng Liu, Thanks for the close read of the documentation, and the patch. I've applied it, though I re-wrote the commit message (below) to make it clear it is a documentation fix, as the code was already correct. thanks, -Len ps. I would have replied to your original e-mail, but there was a period where gmail dropped mail due to space limitations. No worries, as Doug said, everything is in patchwork. tools/power turbostat: Fix Bzy_MHz documentation typo The code calculates Bzy_MHz by multiplying TSC_delta * APERF_delta/MPERF_delta The man page erroneously showed that TSC_delta was divided. On Thu, Nov 2, 2023 at 11:31 AM Doug Smythies wrote: > > Hi Peng and Wyes, > > Just for your information about your recent "ping"s about your turbostat patches: > > Please be aware that there is rarely any reply. There tends to be about 2 turbostat updates released per year. Your patches are in patchworks [1], as are some others, including an old one of mine from 2023.04.03 > Eventually there will be an update, and hopefully it will include all our patches. > > [1] https://patchwork.kernel.org/project/linux-pm/list/?series=&submitter=&state=&q=&archive=&delegate=107 > > ... Doug > > On 2023.10.29 08:12 Peng Liu wrote: > > > Ping > > > > On 2023/10/7 13:46, Peng Liu wrote: > >> From: Peng Liu > >> > >> To calculate Bzy_MHz, TSC_delta should multiply APERF_delta instead > >> of dividing it. > >> > >> Signed-off-by: Peng Liu > >> --- > >> tools/power/x86/turbostat/turbostat.8 | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/tools/power/x86/turbostat/turbostat.8 b/tools/power/x86/turbostat/turbostat.8 > >> index 8f08c3fd498d..1ba6340d3b3d 100644 > >> --- a/tools/power/x86/turbostat/turbostat.8 > >> +++ b/tools/power/x86/turbostat/turbostat.8 > >> @@ -370,7 +370,7 @@ below the processor's base frequency. > >> > >> Busy% = MPERF_delta/TSC_delta > >> > >> -Bzy_MHz = TSC_delta/APERF_delta/MPERF_delta/measurement_interval > >> +Bzy_MHz = TSC_delta*APERF_delta/MPERF_delta/measurement_interval > >> > >> Note that these calculations depend on TSC_delta, so they > >> are not reliable during intervals when TSC_MHz is not running at the base frequency. > -- Len Brown, Intel