From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A289AC433EF for ; Fri, 11 Feb 2022 16:14:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351020AbiBKQO7 (ORCPT ); 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: 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