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 A6D85A04FF; Tue, 24 May 2022 16:39:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 944DB40140; Tue, 24 May 2022 16:39:43 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id B3A81400D6 for ; Tue, 24 May 2022 16:39:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653403182; x=1684939182; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=+FxnZCvw4JYkboxjj+XUTk42qrAkZzvTLX48Y81cEc8=; b=bO449N9+dj4mO3q35/P7E+vSmhnuI6m6d5q1SNsNeXPraCMWr6v3bmzI AkMVQNYQ8QtcLMKAZHClT5B40cNPkIFs9dlSRM4hcPWw8NVPlYKbT2AsX tU0BPLTT654dedk+gyCD+IozjAnuXoBA0qRBlkzVzQsWQeLglDIInTqTY c7BnSyLU1LJUyE4ER0o1d7OW5NI+wGb9wB0l1EB6+MkYJMNGwi5mcbAkC Mdv8p4ZI/Wb4SB2idS1OLfbrHM9MrsFds8mGu6FRFYwm5590hDLdBxMfj g1Yi1BgSY7wEBJxSrmNI/q6cjRHWk8OqhNWkTuRdHRpanRL/Zbz1a4xQ1 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10357"; a="336601719" X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="336601719" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 07:39:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="717194969" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga001.fm.intel.com with ESMTP; 24 May 2022 07:39:24 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 24 May 2022 07:39:24 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 24 May 2022 07:39:24 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 24 May 2022 07:39:24 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.106) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 24 May 2022 07:39:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dDtn2LsA+HSosvWsdMnaZrtvf7uCeDFHJFc+8epOB7lm4fxODm3PMZNOxOo7ZUMfIhOJZkMi4f9gJ3v1uxZkA/shck42AFrXkudAKgoNcInuI2t1j1dtFplOsu14Dj9GP0HjPMZB2VAPh89F08qOev2rYA7HYd156b0zjk5GNRHnNgzl0nm7RuvXbUWgxIFKVG2Tg8zQuuCeoKz+4BtgR0G/jS+2QuTQ4NCvBpq95VdouGwSxRwfsbszDPKUg/U9ggNdHSKU0RmZg2ACa9TeDR+qmUhAL9h+L5V79Rw/TdGz/+vblB6SB5jFd54fvFeGlN7VGaiT7kf1e2HmklRYcQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+TFm0ElK6dqZau8SoEONtHgntk6cAEmeCtCT25Z1fec=; b=nSnO2I+Nq9zpKhjsXzt+bbkNv+RPV+wrlwp09ivQhM4sG3eMjJNyb/3HjVC+6slL1p+BMpQpLrkMzzdaEwy2fEGUUW34keWjq4Mge+N7z88CA5LC6eclenWhOBm9CcDZcEI4dBj7oA+5PBwyUE4f2VgtfMs2cVp4Tza+8XZ7N3xhzjyZj2ykHDUq838umQo77yOedXBDDuPT+tfqxtPYXVKsOnbuv4yhww06vcBH6Z/Bdj8bsiMknA0dzz8MVHq+NYLL5AscQ2sE8b/Yf0gOkk6gP2ZVKsctwtwY2qIyPVLA4IGOoaf3/LyzM2nDUSspleb6n9jyMI+Oq9XIaj15CQ== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) by BL1PR11MB5413.namprd11.prod.outlook.com (2603:10b6:208:30b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Tue, 24 May 2022 14:39:22 +0000 Received: from BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::c5b8:6f47:c4d3:24a6]) by BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::c5b8:6f47:c4d3:24a6%3]) with mapi id 15.20.5273.023; Tue, 24 May 2022 14:39:22 +0000 Message-ID: <67aad86e-2c87-7a09-1909-76c407cd4afb@intel.com> Date: Tue, 24 May 2022 15:39:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.0 Subject: Re: [PATCH v4 3/4] lib/power: add get and set API for scaling freq min and max with pstate mode To: Kevin Laatz , CC: , Ray Kinsella References: <20220408140847.1319312-1-kevin.laatz@intel.com> <20220524131407.423609-1-kevin.laatz@intel.com> <20220524131407.423609-4-kevin.laatz@intel.com> From: David Hunt In-Reply-To: <20220524131407.423609-4-kevin.laatz@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0159.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::20) To BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 39918d65-305c-4e56-b4df-08da3d9330f4 X-MS-TrafficTypeDiagnostic: BL1PR11MB5413:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zcMS4qjyfE8EeTSW1cAXK0h75IVbL+NzWkISnOHkIioQOTgSvMOVpdYJUSsjuWAq+9ZqmXIDwuK4xuSbv1FtMSu0AaCYoARRwz0dGQxONA1CBaqZgqt4wxZkVPxMY4FM2Hl7mw7dP9kThQvw73m7eVTX83lrXHbVMO8kSCOPGXyWjaqNV/N8tyKeIJMY1ovF49zlymPEYOMqUx3hrcrVbkqgAZcnAFzvovbySRnFLr5lJvkfgVzBHobw/tCIS5S1dV9u2lSogRG+aJ1KOotfm72LIjCcbjxu3betLg//m1090BpxLyINdURDqKGiXNT9BJaaE3TewaLjybfoxIa92TCFaXwgvVvAHGAV2FJ2RCPYaK6NvejzOAQhhCtqcw4AF/VsNsZnSCQ+dWXTWZ2UEn0nAVJSSKAxarLxtPGD6Qf7QL99upPldTIm530BH4hXaEfC56sVtswA2MrFq4TSVdnj6XLhH24Bf0mfqWbXmMKHMTIoHWV1b14bcp/GYNry2RD9azZjcveqZkYXSTJza0G8ihXM7zUkAh2NKKYc+0Lu9a83EtW5G7d206BEMhutuS84HaeGAkd2ceR4edD7P+X6LhplX2OAptgS4xcXwgrP2hcMoCZGjPQZ92N/ek8Gw5ucnEChwBBb9LnAXlNocKzGkcMdjBp6nxD6KWYL5k9WRCoG9UhxlU6quKtjEYIXJhr6l8rzzGVMHag6ylHIi3ndAyEzL/GYwSOHahlE/yvw7a3lKuPR2jI6gS5BGJdA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3799.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(8676002)(66476007)(4326008)(66946007)(316002)(86362001)(66556008)(82960400001)(31696002)(38100700002)(2906002)(53546011)(5660300002)(6506007)(83380400001)(2616005)(26005)(44832011)(186003)(6666004)(36756003)(6512007)(508600001)(6486002)(8936002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bk5PV1E2VlJDVnEwQm5kdG5zRzQ4UHFTRVdQUDZwVFZQaU1oQlBTL1hvdFgx?= =?utf-8?B?OWJJRk9kdlNpWTlwdEVkM2s1QXFpelZKR1gyRlpnSEQrYkZRRmdKdzRENlh2?= =?utf-8?B?QUdFSVVTbURGMmZOODllYS9IcUh4YUlINDBLeitLUEFuRy9sNDhxaGhNbTMz?= =?utf-8?B?b0p2cU9peTFSdUpCS3hCNlJZSFBNWTJBekk5cnc1cDMvQlB4QVNVeDcrRlRr?= =?utf-8?B?Z3M1SE9HN0ZkajFkNSs0bExyaXhoN1V0UUY2M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R4V2xtdysyMjJjcEhRUW1xYzJZeWFZK1BURzhuNmNIbGMwYW5k?= =?utf-8?B?VHF0RDhFeUJXeklJWnpvMUFHa0xJc1Yva3QrdzJibnJXRkVEbGxFdURPVTBv?= =?utf-8?B?YlhaQ3diYVp5RUg3amhaSUlxZkdJdzV6NGIxVUlUbnNYYk9nS242b2NCekF3?= =?utf-8?B?b282R3k1NmtSeHF0VE9yRFZtaEx3YjVjUmtrbklsTGJha3QyME04YXJHZWww?= =?utf-8?B?dWNNRkhSMGkxemxpdDc0VVhSVmVOOGRXNzZ0dmlpNW9FRW9EbExYZz09?= X-MS-Exchange-CrossTenant-Network-Message-Id: 39918d65-305c-4e56-b4df-08da3d9330f4 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3799.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2022 14:39:21.9676 (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: O21tz12Wjhdjy+jFcMGMv+h+/KhYy1K/KYTR26Ynjd8SVFpRT61cDise0ILISWr4AH8kyZ9YyvOIt1Uz+hLdpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5413 X-OriginatorOrg: intel.com 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 On 24/05/2022 14:14, Kevin Laatz wrote: > Add new get/set API to allow the user or application to set the minimum > and maximum frequencies to use when scaling. > Previously, the frequency range was determined by the HW capabilities of > the CPU. With this new API, the user or application can constrain this > if required. > > Signed-off-by: Kevin Laatz > Acked-by: Ray Kinsella > Acked-by: Anatoly Burakov > > --- > v4: > * fix mismatch between comments and code > * fix return value when max freq is not set > > v3: > * updated doxygen comments > * added checks to ensure min/max value is valid > * consider 0 as 'not set' for scaling_freq_max > --- > lib/power/power_pstate_cpufreq.c | 24 ++++++++-- > lib/power/rte_power_pmd_mgmt.c | 77 ++++++++++++++++++++++++++++++ > lib/power/rte_power_pmd_mgmt.h | 81 ++++++++++++++++++++++++++++++++ > lib/power/version.map | 4 ++ > 4 files changed, 181 insertions(+), 5 deletions(-) > Tested-by: David Hunt