Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2948373pxb; Mon, 19 Apr 2021 19:03:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTkeMAMWSg0lpVXtrARHzYYKQfVwSQIxWyneAAbvodkQMs5fHrz41K3zzKWQ8StvWHfWGg X-Received: by 2002:a17:906:d8cb:: with SMTP id re11mr24353472ejb.204.1618884223392; Mon, 19 Apr 2021 19:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618884223; cv=none; d=google.com; s=arc-20160816; b=Pw07Erl3sESwefxkkP9LMXVfmb5EnzVz+C5Aw07pzUhL91/LC8f0jEphivSPk5AixF RNSRwTanFxxhKm++ZbNOImYV3OUiDYafGTHMK94TbkzInD/URCxxz4kxMYSYDfahfZrh MR9WfyT3dP7dJJuyHHwqrHczOedIuMTN4cGhN6++k6MfSlQmGc2ejNeftSQqgq1wuseF FZa+pP5JgruAfys3xHA2qUyxJpFXskSPyFIcRSLbq+V9a3W3qoYNDMF2O9q7fB0GNfZe h96mmK9ypXg8eHtIYCLmnG6p2ZddePg9bVooS138rrYKyMorCBcZD77pER+RIW7r1xY2 o1VA== 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:ironport-sdr :ironport-sdr; bh=M9Ji+opKki4K86+WSh/SVuBwUcpv7JBsZMDdQkIhDd8=; b=0H/JFhr9n9SbU3HWpM/AW7PSvxrZgklhEERzjp9R6zOEvfW2+MrX2IEPz3V2e0O+xT LZiKPTGW/x0YqYuChZrP0yvGkqqbG+ij4wpmMHB+vMs772wCU1b7E8dzONqpfI+23bdh k+L8O6yWSrij6SHOd2MYe5KLsAluZL0YlTusy22lgXNHrAfQ4HuW3UYQp/ZHPNHRZvzh Gt4CVZZE1qMlUcrSa6YH1bO+uWy2BOv+aD6HsF1MQt7JELoSf9K7C6tVttgtVWKVDYQz pPCK1O59jvkCvLwGRAFEwbcS14jvA8UYg2IU2NBFxwsALvZX6bFaV9+uE18SnXwWaPic /4Dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si13509299edr.71.2021.04.19.19.03.07; Mon, 19 Apr 2021 19:03:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233430AbhDTCAW (ORCPT + 99 others); Mon, 19 Apr 2021 22:00:22 -0400 Received: from mga09.intel.com ([134.134.136.24]:30085 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbhDTCAV (ORCPT ); Mon, 19 Apr 2021 22:00:21 -0400 IronPort-SDR: 59E1uVoB9z/0HEL4cbwnaDI0/IGO2FKxgccl0ymz5u4PCwR4+h8ZsnCFLJ/eokhV1nePzax2xm fQQsBNi1FcYw== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="195541832" X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="195541832" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 18:59:50 -0700 IronPort-SDR: ftmXhnYEFk2x+ACtl8Op7mLBGHcxaCOv0Us0O3Vp5K0UUXkxaRXAHmYPe1y4El8Gy44CQxp1Ul 0DuHOU/R73rQ== X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="426730850" Received: from chenyu-desktop.sh.intel.com (HELO chenyu-desktop) ([10.239.158.173]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 18:59:48 -0700 Date: Tue, 20 Apr 2021 10:03:36 +0800 From: Chen Yu To: Terry Bowman Cc: lenb@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, bp@suse.de, calvin.walton@kepstin.ca, wei.huang2@amd.com Subject: Re: [PATCH v2] tools/power turbostat: Fix RAPL summary collection on AMD processors Message-ID: <20210420020336.GA386151@chenyu-desktop> References: <20210419195812.147710-1-terry.bowman@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210419195812.147710-1-terry.bowman@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 02:58:12PM -0500, Terry Bowman wrote: > Turbostat fails to correctly collect and display RAPL summary information > on Family 17h and 19h AMD processors. Running turbostat on these processors > returns immediately. If turbostat is working correctly then RAPL summary > data is displayed until the user provided command completes. If a command > is not provided by the user then turbostat is designed to continuously > display RAPL information until interrupted. > > The issue is due to offset_to_idx() and idx_to_offset() missing support for > AMD MSR addresses/offsets. offset_to_idx()'s switch statement is missing > cases for AMD MSRs and idx_to_offset() does not include a path to return > AMD MSR(s) for any idx. > > The solution is add AMD MSR support to offset_to_idx() and idx_to_offset(). > These functions are split-out and renamed along architecture vendor lines > for supporting both AMD and Intel MSRs. > > Fixes: 9972d5d84d76 ("tools/power turbostat: Enable accumulate RAPL display") > Signed-off-by: Terry Bowman Thanks for fixing, Terry, and previously there was a patch for this from Bas Nieuwenhuizen: https://lkml.org/lkml/2021/3/12/682 and it is expected to have been merged in Len's branch already. thanks, Chenyu