[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 04/14 RESEND] cpufreq: Add Hardware P-State (HWP) driver


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 10 May 2023 16:19:57 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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=xDq3oeqi/3d0JA7vdfbc7ZJ6gyT24syYN1sRWt9jqR4=; b=DfLw785ExFefsQE58gaqjFJm31V+GxvZWkzGWfAEy7SUBW8p7bRXIrqUqb9/sDpGBoGvoUHa/ni5qamzlMDlc3S/1KdF3A28k3ctue+Swoi9oN7A4KNaJQ9ujCFGLaBURXH+S6NOlfVM78Xkn8tlI+/63ah4cX77E4n75V/n4qTjwJCDE2u63hnZcTsxwII/rbT3KVHKUYchgZ5TcreQOZ1RAhcEz8I3mNvlZGmfhoTJjdrIoPHSW6ntij/HtR/tVAIKU4K2uzUk4HCXY6arxuxkkYbgQiuZGaQlLBpzv2ZdcoBkCCWivoQOiQoDgbDgpzvGFuJO21n2MXCyw+eZ7A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qls2oOEbzLEbNw4KI3CSPI9W7xgTGuOdjHY3SK4cNZ/oM5pjFofyYmGEWDznNad2BYuhHhK9kX5516JGeHCkRCfKyAe0WZZTd/6N6exl6i5z1TmpwG5lurJpYGRzauoKzbT8vRcBHhljrXJXv0a+HDYzRQchTNlgxkCdwzmBPHhGxaGbgg+5YI7cwmIL5iv1DPqrqSgzrPkqsKbJt4o/Loc1DW93ZVsVmN++1Ip6gk6a/DLWAW05jmNEuH3T4N0TZ6V/TpsbLp2ge5RCWe9KWebyxlGIwEsSsvvBZWV9oMEA5gY6GS6sbMLESIL13xZpP6QjecnW7hBvvKQW6hGqPw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 10 May 2023 14:20:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.05.2023 15:54, Jason Andryuk wrote:
> On Mon, May 8, 2023 at 2:33 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> On 05.05.2023 17:35, Jason Andryuk wrote:
>>> On Fri, May 5, 2023 at 3:01 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>> The other issue is that if you select "hwp" as the governor, but HWP
>>> hardware support is not available, then hwp_available() needs to reset
>>> the governor back to the default.  This feels like a layering
>>> violation.
>>
>> Layering violation - yes. But why would the governor need resetting in
>> this case? If HWP was asked for but isn't available, I don't think any
>> other cpufreq handling (and hence governor) should be put in place.
>> And turning off cpufreq altogether (if necessary in the first place)
>> wouldn't, to me, feel as much like a layering violation.
> 
> My goal was for Xen to use HWP if available and fallback to the acpi
> cpufreq driver if not.  That to me seems more user-friendly than
> disabling cpufreq.
> 
>             if ( hwp_available() )
>                 ret = hwp_register_driver();
>             else
>                 ret = cpufreq_register_driver(&acpi_cpufreq_driver);

That's fine as a (future) default, but for now using hwp requires a
command line option, and if that option says "hwp" then it ought to
be hwp imo.

> If we are setting cpufreq_opt_governor to enter hwp_available(), but
> then HWP isn't available, it seems to me that we need to reset
> cpufreq_opt_governor when exiting hwp_available() false.

This may be necessary in the future, but shouldn't be necessary right
now. It's not entirely clear to me how that future is going to look
like, command line option wise.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.