Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5568274pxb; Mon, 14 Feb 2022 02:10:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxv5FcGdeok2S/adN9vOi6xw/ry4nT2n2PGcRyZAHyj0CQQfhxi99OdDhNQnFwpO84/Ym0 X-Received: by 2002:a17:902:7049:: with SMTP id h9mr13648529plt.121.1644833445854; Mon, 14 Feb 2022 02:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644833445; cv=none; d=google.com; s=arc-20160816; b=j4kRFzwkPrylKLohI1vCXZF5NgJQU4zfxqffb+cyi+Z8qpemr2vZSH2FiWXab2agMO epS5XnzzDGAjxGmnBKaHS3mOz1dcJXbaBYfDT3lq+k9Ad06L17wLyoD4AC7VPhD072fO 1V40brhSQy8RXrI5SMP8gZVD59mjxSHd4devN0KbjN8r+6SgLcSs+kw9MQEUMzxil3Yi nl1GwyfhBID9D8659WCK+26qgswGakPWa4SFFgcJhLXY8wMi+K2DwCA+XwsmrJwlmVSM 22Po3Nyyr2dunbrleoZ5Ps0E1b5zIOhqE3uLgnkfKaa46zD4xrcOrEXsWyXObAL3ilNJ y3vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hR+Ajnf26utCWZYjqc/CMnjGa7qUkdeOyoz3//O9RHQ=; b=AzuGcHLVrBLOl0TXSseiaGk+Q2w89ZJuV0r+X8CYYjcubYtaCnnowXkon44VolmjyU mwNQ9QQTDuuo/IHsW0Dpsj7IWpYfB4IUdMfVtWF5jAgnQbRdsv346ejsB+ScxrKy5Pe5 79nJ14GJ7TjHxdyjEp0myiRoluY8ImS1Fkn1TA7Ossw40ExtMIP3ULmzEi+WWy4m5KPu KrIa8O+9Aihm5GCBys9GksmR11FOkyC7Ky/ZXsI7M0sS2FpUsu3Gbxh70ckHa3vAnV+u LiRUfyRR5TjX+tw2+msEktHpYKmcLHoo1rvFjvGsrDp/7UCKj17vaEPtD4au8oz+RvNP Gp7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YfhjY0It; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g65si12427500pgc.837.2022.02.14.02.10.34; Mon, 14 Feb 2022 02:10:45 -0800 (PST) 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=@intel.com header.s=Intel header.b=YfhjY0It; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351007AbiBKQO7 (ORCPT + 93 others); Fri, 11 Feb 2022 11:14:59 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350520AbiBKQOx (ORCPT ); Fri, 11 Feb 2022 11:14:53 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED3021D; Fri, 11 Feb 2022 08:14:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644596092; x=1676132092; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=RWbStBYrWNvjoowojkTzcClFVyUrdMqAa6rUIGP5GYk=; b=YfhjY0Itk7Qy8ZdLN7bomIuG5FfguhVSRHe+zAlXrokY9A3RvXuh4Ed4 Sdcpl+JXLqXo2RGquuRybrk+axhKfUFRaP1uha8uxTKnldSSVV8AI+Nxj EddBGMo3P9LbKP1z+rmrB3AOBfYno3HqhPMdhuETS5CxpCKrDvoDk4Zju n3CrxUn58He29OEIbIclz6cDVAxTQ2uNhXTKaidoLMJ5Eur2UVudJmrSu lICAeAVghvJ3/4+uZ5kF0eeKxgq/ZeH5TAq3VA4mbn69+sWxXBy3cSVCq 6Cgy7BlsqiVflhe25B6uVRdHs/ToCqmgGYORzEsYm6YLcTcjIDCSq5L3+ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="313039538" X-IronPort-AV: E=Sophos;i="5.88,361,1635231600"; d="scan'208";a="313039538" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 08:14:51 -0800 X-IronPort-AV: E=Sophos;i="5.88,361,1635231600"; d="scan'208";a="542143938" Received: from chenyu-dev.sh.intel.com (HELO chenyu-dev) ([10.239.158.61]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 08:14:49 -0800 Date: Sat, 12 Feb 2022 00:14:23 +0800 From: Chen Yu To: "Brown, Len" Cc: "linux-pm@vger.kernel.org" , Len Brown , Artem Bityutskiy , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] tools/power turbostat: Support thermal throttle count print Message-ID: <20220211161423.GA55414@chenyu-dev> References: <20211112115159.725357-1-yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 Hi Len, On Fri, Feb 11, 2022 at 10:14:12AM +0800, Brown, Len wrote: > What is the scope of this counter -- per-core or per-CPU? > The counter is read from /sys/devices/system/cpu/cpu0/thermal_throttle/core_throttle_count, which is calculated from MSR_IA32_THERM_STATUS (0x19c) in therm_throt.c. According to sdm, this MSR is of core scope. thanks, Chenyu > -----Original Message----- > From: Chen, Yu C > Sent: Friday, November 12, 2021 6:52 AM > To: linux-pm@vger.kernel.org; Len Brown > Cc: Artem Bityutskiy ; Rafael J. Wysocki ; Brown, Len ; linux-kernel@vger.kernel.org; Chen, Yu C > Subject: [PATCH 1/2] tools/power turbostat: Support thermal throttle count print > > The turbostat data is collected by end user for power evaluationit. However it looks like we are missing enough thermal context there. Already a couple of time we found that power management developer asking something like this: > grep -r . /sys/devices/system/cpu/cpu*/thermal_throttle/* > > Print the per core thermal throttle count so as to get suffificent thermal context. > > turbostat -i 5 -s Core,CPU,CoreThr > Core CPU CoreThr > - - 104 > 0 0 61 > 0 4 > 1 1 0 > 1 5 > 2 2 104 > 2 6 > 3 3 7 > 3 7 > > Suggested-by: Artem Bityutskiy > Signed-off-by: Chen Yu