From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1C8C6A0C4B; Wed, 14 Jul 2021 11:15:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FE2D4014E; Wed, 14 Jul 2021 11:15:14 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id DAFFD40140; Wed, 14 Jul 2021 11:15:12 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10044"; a="274144493" X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="274144493" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2021 02:15:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="466031987" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga008.fm.intel.com with ESMTP; 14 Jul 2021 02:15:11 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 14 Jul 2021 02:15:10 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 14 Jul 2021 02:15:10 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Wed, 14 Jul 2021 02:15:10 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Wed, 14 Jul 2021 02:15:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=koDsXNIJ0ZiGLfqb/K8slFjrqFhtaxBbgQ1IpVMa5noiei/mBPn+Fh3Fu/fPKT49cHHSVgXBpV8gyjeZVQfgQUGKtKJe0UYZ6sQzN0xKfBacLhmC80sPvcOHWnD1tWpFGBq7WvhwVQ7luowoQLTs8OPsJzkQHOrTcF71eO1G6uDKrAMAskdJWHGSlrgWEsC6WxN1HmkGPdZEYs2Fy3PiN/Y2j9n4OUA6xbTWUVou+vCija1rsffrhuy7lkIwRI2heCethso1S4Q1tX8nV6LASCwU97xoyizuhesb/yGuFU7uycJo+IqgGFM+JcxAVNbHcx0HYxihL8yJls/mhESWdA== 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=IfTxPgpMQhnYzO8zx0/T1UA+wlOBxzO3RZJh+8rZr2k=; b=TYHlpFaaqmVCja+HpLexo08ZLGuzsr3HmVyl4p1+gwfKmN9MT8n/FSfnJbjsrItefNdsbEIKiFD6vo7UXbcibcPt0A2KmuCtOBZroDAyqLf1fapNCKAtdJrFzZhLCjNa2OY2DO/DQmTt+a7DrWmiIHm+X1TNe8EYbYbJ/93RPVjJHlsSGdDrorEKocXGIiLHjLrCBS3IsCfxNfrYoLCjgK1/CNLrYOj8LQH20n+rIz44MhRuW8Y8k4M+alP2lGuL6m8YSWXOrVHaZr1D9T8ZD9dGJycgBk99/rURF6yjQ2M597OoY82AdJuQbzuJTYTcAf+DDlzMeIIemQDfvPVW6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IfTxPgpMQhnYzO8zx0/T1UA+wlOBxzO3RZJh+8rZr2k=; b=FwF725328F8G7opyhBIDhrTXuMO5teM1CVtknQOyVXiA0v713nRyuxebtWYu6Lqye6BwkYkq6ZIYix5/XjxZDRAPbdqmG1yQGUFGyJMFRnR0I5T1IKReS3Bi8I7pQV+vNwpNDLBfSea3UAQi+SppYt2wjA8dy1k2+Q1nZRb2G6Y= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5047.namprd11.prod.outlook.com (2603:10b6:510:3c::18) by PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.21; Wed, 14 Jul 2021 09:15:09 +0000 Received: from PH0PR11MB5047.namprd11.prod.outlook.com ([fe80::80d7:1f43:844f:e10c]) by PH0PR11MB5047.namprd11.prod.outlook.com ([fe80::80d7:1f43:844f:e10c%8]) with mapi id 15.20.4308.027; Wed, 14 Jul 2021 09:15:09 +0000 To: Richael Zhuang , CC: , References: <20210714084407.51979-1-richael.zhuang@arm.com> <20210714084407.51979-2-richael.zhuang@arm.com> From: David Hunt Message-ID: <7fc966da-9eb1-4fe8-2908-d10bc83f4c20@intel.com> Date: Wed, 14 Jul 2021 10:15:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.11.0 In-Reply-To: <20210714084407.51979-2-richael.zhuang@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: AM0PR10CA0129.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::46) To PH0PR11MB5047.namprd11.prod.outlook.com (2603:10b6:510:3c::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.4.11.161] (95.45.22.52) by AM0PR10CA0129.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 09:15:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b35ef31f-9863-4ee8-efd0-08d946a7e0d7 X-MS-TrafficTypeDiagnostic: PH0PR11MB5093: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K508yHY7syqqNhmWSAApe1ks+TUw9gcl4wauJHPoEWiN5BLtJQDoccmtOkenYiGNgRkRTqp9CDKVp6WuoV5HPKO3SzoLlL82ZgICmXk+wt2/bd4t+rUmQrur37d9bORbQNOau3+AZ6UY5KCUefm84NfiH/cyz3OJzWrnrJr1LEf42CYSCT8dPLqmiaGLhJF3P4QolwXXmMBzQ71yCGcmpjQZDf1FVbi2lSdsWtMxeXPEz1hK7ceijCCbPzZ1cEPWcYS9FyUqkusWKZP4bHSQS5oZMUy8fRvEBZhRETbOJmQuINCb+3NvtibhqKgcI+llBDepjgF5er9CB8RwtpZORb9Os+SsVumd/mOlSM/kDE7Orv7jxZKp5/8lLDMMhIyVe7SNvNs8Y8A1ZnjpEIEY4VsAwZX1QL7IVsTLv4XktInp7RD1UB5KpDrAwCYi1v+ISQElFV5eL1wJYrLds+DmeImA8NaQmZJtofPti6567E1J5VpQ8veidh+6QMFW004BtVa8lsn3WfToBcB26j2OD7MzKHfkEMClkomrwlSm2Sk44VbJPEM3eXABq3qv0p8J/YfeVDcfARe8NeWhze3fVfJqbMTU2ejWtVTk0E7PvsMH6Ud/1llnUbvJ4N29FqgdPKhCQ4RLmUowd6mWWb1NzB+xK3g5WvUIXZJlAHFuDsgSPFa8S5A9zq90BQi8HWr7LxnZcaHSIHUt7/nK+1s2bNrhze+TMO1xh8c0YGcMKLw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5047.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(396003)(39860400002)(366004)(136003)(376002)(38100700002)(6486002)(8936002)(5660300002)(66476007)(36756003)(44832011)(26005)(53546011)(66946007)(8676002)(86362001)(186003)(66556008)(956004)(2616005)(31686004)(6666004)(316002)(2906002)(478600001)(31696002)(4326008)(83380400001)(16576012)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aEU1RWpId29VTitPZWlNNUZuMHYxd1d0dTcrT1g2S00vd0RQWDJsU1QwR05j?= =?utf-8?B?NnFkNXdJb2EzK1lKNnhFNm16M2tYZGs5VlpzaHBWVzRqbVFWTzRLUjRjVU1j?= =?utf-8?B?WXBjNWMrV0FwNklMcEIvU3gyaVNzSnZwNGRkWGZrSnk5V1pSUlhEZS8yV213?= =?utf-8?B?aWdvVElVT0EwdVdOVjRWMFp0NXhrSyt0OGQwdlB1aEtRSVRQS0Y3VzZPbFZS?= =?utf-8?B?dk1BY2tVbFp1OExJOC9YbFZ3V2ZtcFI1VG9YcnIrbjRRUFVGV0h0ZFBU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vdk9LOFpjSU9wOS9OUUNoZlV2?= =?utf-8?B?aEp4MWdVcHRsREx1dE9qWFNiYlB2TnVrd1hlR2dudnFqTlp5cS96SGUvR2I4?= =?utf-8?B?bVdYa25qU1gvV2NwdUx3OE9lSWthMVhacUwvdkpQQ0JFemw2UWIvRXBSWi9M?= =?utf-8?B?THdsQWF1NVdFRERvaklsRDBidzQrcTVqdlBHaHBFTDZtN01WODNYa0UvVngv?= =?utf-8?B?cC9oLzBycXczb2VYOUh5L25VaXpKcWR3RWVnZW1JanZzZDZLMUZPWmhBaXdG?= =?utf-8?B?YmlqcGlEQk5BNnpodDVLT1dOeHZOOFJUZ09QNk5RUjNjTGtoWDhJeGJwTHhj?= =?utf-8?B?cVFxbWtVNWJsbGpGYTVNU1hlUDcrUWR5dmxhSFR3c2I0WDdxQ010Uk9RWHdD?= =?utf-8?B?cjJuQnl0akpoc3NCbFZqSithWE1Bc2lSK0YvK005UFM3YzMyT2lUNWhlVmZO?= =?utf-8?B?MFRrOTFXNDBNSVhkOUVicFppR3dCbjJNMnJTUE9JWlJiaTFPOHV6TWZSc05t?= =?utf-8?B?aVZISVkrMDlTV0p5YjdXbUVFaExNaWpqQXJHb3I1eGI1MXd0ZkZkb1RtRVla?= =?utf-8?Q?h6yujyeBdtZCI0dJY/huxeqNpXIJ1zpXCzk9Ob0?= X-MS-Exchange-CrossTenant-Network-Message-Id: b35ef31f-9863-4ee8-efd0-08d946a7e0d7 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5047.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 09:15:09.6342 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: drQc1YBW/bfZUg3BWyPOh0KQd2YR8huI9PmKSQXOEs8veYZNKIFdM2VaRwhKOV7B8OOfhzI0XkAl3Y9pHZr7cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5093 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1 1/1] test/power: check cpuinfo cur freq before scaling cur freq X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 14/7/2021 9:44 AM, Richael Zhuang wrote: > For acpi_cpufreq and cppc_cpufreq, both cpuinfo_cur_freq and > scaling_cur_freq exist. For pstate, only scaling_cur_freq exists. > And value in scaling_cur_freq and cpuinfo_cur_freq may not be the > same. For acpi_cpufreq and cppc_cpufreq, we should check > cpuinfo_cur_freq. So here checking cpuinfo_cur_freq before > scaling_cur_freq to make sure it works for all cpufreq drivers. > > Fixes: ff6dfb8e492f ("test/power: fix CPU frequency check") > Cc: david.hunt@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Richael Zhuang > --- > app/test/test_power_cpufreq.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c > index b8fc53925c..f56abb6f86 100644 > --- a/app/test/test_power_cpufreq.c > +++ b/app/test/test_power_cpufreq.c > @@ -62,13 +62,13 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo) > int i; > > if (snprintf(fullpath, sizeof(fullpath), > - TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) { > + TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) { > return 0; > } > f = fopen(fullpath, "r"); > if (f == NULL) { > if (snprintf(fullpath, sizeof(fullpath), > - TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) { > + TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) { > return 0; > } > f = fopen(fullpath, "r"); Hi Richael, I don't think this patch fixes anything. If the scaling file is not available, it will then attempt to open the cpuinfo file. Changing the order does not address the underlying issue. It looks like the test is failing in check_cur_req, which is only rounding for cppc driver. I think it also needs to round for the other drivers. I've just checked intel_pstate driver now, and it needs the rounding. I would think that acpi driver also needs it. I'll do a bit more investigation and see if I canĀ  change to acpi and attempt to confirm that all drivers need the rounding. Rgds, Dave.