Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1725776pxy; Thu, 29 Apr 2021 13:08:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbg8UH0FncqdruRNPKzlErlZ5Pi7ieUAnx8VgrMBTNSvnGsx3i0V6jo4nHddaGby5G5Lao X-Received: by 2002:a17:90a:c781:: with SMTP id gn1mr1608877pjb.205.1619726885625; Thu, 29 Apr 2021 13:08:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619726885; cv=pass; d=google.com; s=arc-20160816; b=KPJZ7iM4jbFDNYbjGvS/Fy4mScr8p7c+7G6TgSOb/z/4UqoCBXo815Z+qgWzxtVqXo fDel2RASi+fLpbeU3qk/xcLLq9HI/sbhOV+GGSD5F6HlgZy7NFhH3QTYsQ59dA2+fA0a ugN8W4+Z5wWjXwVqoNiBPH69nMB6x2+G6P4vKWzo6ZZ/FN5twTyh7YY2dIKS5YDd4Kbt UGPnrq9AsVsH9yBQGt5LFGHQSz9jxTtzmxl4UYENFu8D3xS1OzfS8LWALLfExYBP+HoH ZrJC82kn5QQ1R0ZRQTTwTwLe2lQxShOX2ZmuMD7kvws3c5jt1UP6p0a0p0UsZegQHoWY je4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-language :content-transfer-encoding:in-reply-to:user-agent:date:message-id :from:references:cc:to:subject:dkim-signature; bh=kEjun9L7td11rWYyg5qHN5rlM9zJwHwx3vAyhzhsLIs=; b=QFH1G7DXZhQpsYY7TCbW00lLbTPBO9f9exXIprHnFABW5rjbnV0hdzEVJ8/ggsqTmQ pxZbuPyLbxnwEwN7DB18POtteRsAiM4uzT8ORx6rOd1daR3qesmKDRxMFZLFynck8FIr PUGPEJQX5ygLws25zrzexa71Q4MX0zbKYDouHg1suhYL0LUYYv9lNrFOTr1NMOQhomm2 w5aDTJFAWlDMhBtH/W9eo5AOKVaJiwJWQNx8Pcbx8vAX/nJFXl+qeqS7NRHj88Li6FDL ULwyoYXAlCDYrDCpVKszw25/ki87nrInIGem93knOKLu2FaR8IZ6y1QtaWDaCFJNvuQc ZgAg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=mp1xjlAK; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=NONE sp=NONE dis=NONE) header.from=amd.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si11947006pjg.9.2021.04.29.13.07.52; Thu, 29 Apr 2021 13:08:05 -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; dkim=pass header.i=@amd.com header.s=selector1 header.b=mp1xjlAK; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=NONE sp=NONE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233995AbhD2TsH (ORCPT + 99 others); Thu, 29 Apr 2021 15:48:07 -0400 Received: from mail-bn8nam12on2048.outbound.protection.outlook.com ([40.107.237.48]:18528 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233984AbhD2TsE (ORCPT ); Thu, 29 Apr 2021 15:48:04 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X8P/19UTgV/jkTvuht7O/UrUl7sIhN+gG473e+fqadFqLmnT+/kasSsT34Tpwr3VQrmp9sE9vetiNRXKtx/i7EMw8QI0xYBBBcQ9KOmuFiyzrQNOvYvlOuNdtkaR+uMfLWJ26RZNLEWfVvadMtp3boZlZEHMBy8hMGwRhRWgkxgrkXASrFlfPC4SJ1dFD+750OhB4avjai/ApmzMJuJQP8zGQb1CqGJRcEBwBdJY0KD4ZXyUiUBHHyfnBZUuCPpqKWYKQmeUnyRUEXf8JeJ+3AuZ9/ueXODfARi+Fe2sZ2Pu8jPwtOzqjq9PbVFtUgUlwnqRcQmeguIdrjTOnx18CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kEjun9L7td11rWYyg5qHN5rlM9zJwHwx3vAyhzhsLIs=; b=oKv1uV/wMOkbL16yfrd6nmEN0dM6IA9Aa2wInhmtSTUevTWBkTShDzcCTl4kmWU73Nf4gaGcm6/LLjUS2XljWnWfP+kQXq2Thkv7R5l7t76mu1tLb5gDbWJrRkF8MCt5l2X39gdx+0mp3qH1mZ5jldqDq/kUusj1EgZFFIzK7MlBaWEdOdSUQCQTmbFt/JYymQpq0xECTwHeKWIELdF55mI+3eS74gZcgzsHVgZ5rs71uCSytPpPvn+bj/XK8pitplDvPFfV8UVZtT1jjSIoqDRwaCF9FO48ls6vQxpUo06fZRvCBSzq3YUkqs7Qq9wvEBYTJQcLcelCz1klD27fVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kEjun9L7td11rWYyg5qHN5rlM9zJwHwx3vAyhzhsLIs=; b=mp1xjlAKeq1Secqq0BA0GgjyUkK/6y5D6DjU54L9vM+RS3W+XBKfOV0asErL6gUzWV18dMbA9SkanjEHqf00wybCvlcmRUj+16ur3f4iIuJ2FD9prGDw4amdgJb/0urqCOtPPSiCXllnemUGpYGMyIEQ3qUPd33hCLzlC5bq+d8= Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB4512.namprd12.prod.outlook.com (2603:10b6:806:71::9) by SN1PR12MB2544.namprd12.prod.outlook.com (2603:10b6:802:2b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.23; Thu, 29 Apr 2021 19:47:14 +0000 Received: from SA0PR12MB4512.namprd12.prod.outlook.com ([fe80::3e:b8e1:a378:413b]) by SA0PR12MB4512.namprd12.prod.outlook.com ([fe80::3e:b8e1:a378:413b%9]) with mapi id 15.20.4065.027; Thu, 29 Apr 2021 19:47:14 +0000 Subject: Re: [PATCH 0/2] tools/power/turbostat: Fix long time duration RAPL calculation To: Chen Yu , youling257 , Kurt Garloff , Bingsong Si , "Artem S . Tashkinov" Cc: Bas Nieuwenhuizen , Calvin Walton , Borislav Petkov , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: From: Terry Bowman Message-ID: <98b16cc0-f69b-d443-8a75-076a8117946a@amd.com> Date: Thu, 29 Apr 2021 14:47:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [165.204.77.11] X-ClientProxiedBy: SA0PR12CA0004.namprd12.prod.outlook.com (2603:10b6:806:6f::9) To SA0PR12MB4512.namprd12.prod.outlook.com (2603:10b6:806:71::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [172.31.10.186] (165.204.77.11) by SA0PR12CA0004.namprd12.prod.outlook.com (2603:10b6:806:6f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25 via Frontend Transport; Thu, 29 Apr 2021 19:47:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 336c2559-8f18-4edf-d479-08d90b47964d X-MS-TrafficTypeDiagnostic: SN1PR12MB2544: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XRoarT7J7k+VsVj/hTsfjr6lH5TO3tJQtNDhwZAgwTeQvIwHAK2nYDP4TNqxt3fEfxhwYqpMAVDp++CxIsmSsvv9vitEbhwgmw02eb/89NGP7az5lB0zFv26vFuo8iFpd9JDO5lLYpsJfZRO6TAyo77qepfROtbedRn9jw6fJAoXGa8CNE2XjhI/R7JQrPnS/nGqXECx7f2d61Z4RvDdXYxNonwxfO8DbBOp16heQGKzuOpL9Ebug1IzxtO66CrqLsFsbCkmWv8Xn71x17InvrPhzMqE/Cdrpo6cx0fEO7R51GXEQRJXs8tWEk3BFdiNVvPbrRQEg9mMRpCcUs1VtEC5WX3bph5Az5z8db7zaGnBRANv0ffpF0P7VFmdOasej+nPw6Y0hU98p3k1OaOeCl86gl6e7pIoJVXKHldiqUqK+cF4kKQnqT4em7NYcC2AL6TGPE+bCuPdS9wuDeRyMm5hxI9buBgO11GCV0kfSJt3d/oV4CR6ekOYoxQLXS0YTdy5YF6KizWnHs+uCwAzKLOknXc14uX4dPWThvfTBzoXmDlwXQDleUI/oqFTsVAXMzGH/tnbYlUf1+ex3T0600rGkhZwAfhxAoVt9Gy2ca3gCNh3hC7VF/QzNk/yl0VVXgHQ1dBOIeq5o0ho4b2nyeKNO8VziQSqN8CYxnF/sIeETMbDN8yxY6BU7EKuCbwa1pz3Sqe8wNrPDLpvMj2xtHAMBGjkvz8LkfaYfZPVimE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4512.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(39850400004)(396003)(366004)(136003)(346002)(66476007)(956004)(44832011)(66946007)(66556008)(52116002)(26005)(83380400001)(38100700002)(38350700002)(2616005)(4326008)(36756003)(31696002)(110136005)(6486002)(316002)(4744005)(16576012)(8936002)(86362001)(478600001)(16526019)(53546011)(31686004)(54906003)(8676002)(2906002)(186003)(7416002)(5660300002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?Z0Fmb1k0RUlGcXNRdllZVHhSejczeFNwSjZoczl6VTg4dXQzVEdMMCtMWm1z?= =?utf-8?B?ZUFETVZ1NVU0QkVHNjN2cGUxYUkvZitXV1FPMXlHVVpWSElDUUR3VkVyaHhy?= =?utf-8?B?YTBJUzBwd0RIcFh5Y0doVm5Sb09Lb0pBTTRkUTAzaHJMN0VGclVldUd0bWI1?= =?utf-8?B?bzJCTzd4b2FhSnJtVWRmQU1LMUEvYzRSb3A3Qko4M0cvR3JyNkNDVlNPSVR6?= =?utf-8?B?RWZ6VFJoNmFWVGRCeFlDTXI0Y0hCelA1a244L211MWhvbGtIUDNXNFNuY3F5?= =?utf-8?B?U3Avck9UOWVWSFd0QVFzK3ljQjZaRFk2NTgwYkwvRVdhZGdZT3A3eWlJWGVD?= =?utf-8?B?ZnpTb01RVndBVkx4cG81ak9lV2s5RWNJUW9RUlhpZ01ManhrQ2dKVytERk9I?= =?utf-8?B?bkt2eHpqbXJnMU9xNkpMTGg5VmFFNlVUYmIxUVBHU3ZBM04rOGRjN3ltbENm?= =?utf-8?B?SXR5WlExcVpkZ2VyS2I3WFQrY0NyVlRPWktnSXpMTS8xYlFES0FqL0dwMGh4?= =?utf-8?B?ZEd5SjJV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?RnR2THRtVDdRbXNsRWtyZmNoOWRxUG1DdktKTWREcENvaHhZdncvT2pvMXRM?= =?utf-8?B?Ym95VEdCVVZLUG5kK3p6RDNBTmZGOGxnZWh2VnFuYVhPOWFIU2hLbVJwK2Zo?= =?utf-8?B?SGVhQXl2Uk04MC9mUC9Ua3F4SkY2UXJLN2RoYXluWFpibzFwWnR4aTdsbC9J?= =?utf-8?B?RTdJOXlZeURxZWpadDJHS1NqYXlQeXZRL2h5YTB2cWdVNUlaY1hqRDk3TFR4?= =?utf-8?B?SUFUWmo2OFVtQ2MzVDQ0eDNsaHprNTdWK3JjaVN5dStoYjY1MVkvNHUyRlBm?= =?utf-8?Q?MK5XqajPA6Fk9p+vN2vEeUGD7x6Sem3lXKlB7N1?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 336c2559-8f18-4edf-d479-08d90b47964d X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4512.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 19:47:14.3550 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u4PHLGZq0opXvqzvy7NP5c/hYxIAGGkkWYeq62aayrYsKw0a1eB39GXz73crkBBfnneZBJG5PAEGd/doE8ciKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2544 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Both patches look good to me. I tested both on AMD Epyc Rome. Iverified the missing output is fixed and used instrumentationto verify the sign-extension issues are resolved. Please add: Signed-off-by: Terry Bowman Regards, Terry On 4/28/21 4:08 AM, Chen Yu wrote: > A combination of patch set to fix the recently introduced long time > duration RAPL calculation issue found on AMD CPUs. > > Youling, Kurt, Bingsong, Artem, could you please confirm again > if this patch set works for you on your platform? > > Bas Nieuwenhuizen (1): > tools/power/turbostat: Fix turbostat for AMD Zen CPUs > > Calvin Walton (1): > tools/power turbostat: Fix offset overflow issue in index converting > > tools/power/x86/turbostat/turbostat.c | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) >