[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: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 12 May 2023 08:28:43 +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=oHFhPSwrTcUXK8uA4161kdOyRt5H5iLkWrE/pxhUHzw=; b=U8AfVUnHBbIHS2e1mW3IL45iFPwKFPciPdQuUmvwqkov0Wfw6ZM6W1o/v6BtIzTJZ4SQD3Of7E2gNO9VAZ/x8znZ6rIwv4oGEje+YlEwMIPVFkXL2CpMKCsad7f3+X5T8tGF/y203cxPXicFn9jtRvPxzAsMWeAEb67DCleo5LY3mrPKint0VI8ughw+BTzYavzJRQRWdfzD2RbxeqR2GVBOo4eQmgRGd0QhvVum7pYBNfX+5bd/TA+exW04FEJH0biV1TwJCMxAbJfNkqq+FlN1AfixkZjIIrtOc+819NTTu/hTBgGIote27MJuXGQFq+1LEv3QsBBOxuWajzs2VQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WuLJe5HgRCxDdpcsOZAwOuWsn8oNY694dqUH0jibLUVg4pR2NIGU+rfk+Lz/PerMFt3zcH6Z+D1/Gp4tMPLgwXvOC8aWV/00lkmktwxhj8aijmmlnD7pVKUqYtr02v9CuhfkEpZdR51t3tvaHSdts2P/YZdntNbL0w6K6qsTxOV6yto3ApIapfY65lLCjFQI9ngCdHscJBEtoAl+Gr5DYg5jAee8QYsLCWDCUe2HykYIkwjdA9LhaLPsQ/9MOxzXvNSWw+F37qDEuSRbO54PuDjmvuXS62anfZ/pFy1Me0emuMqvb9HbTH96S16/jtz72or07tlpsOtDCLh7bqdXWw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Jason Andryuk <jandryuk@xxxxxxxxx>, 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: Fri, 12 May 2023 06:29:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.05.2023 03:02, Marek Marczykowski-Górecki wrote:
> On Wed, May 10, 2023 at 04:19:57PM +0200, Jan Beulich wrote:
>> 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.
> 
> As a downstrem distribution, I'd strongly prefer to have an option that
> would enable HWP when present and fallback to other driver otherwise,
> even if that isn't the default upstream. I can't possibly require large
> group of users (either HWP-having or HWP-not-having) to edit the Xen
> cmdline to get power management working well.
> 
> If the meaning for cpufreq=hwp absolutely must include "nothing if HWP
> is not available", then maybe it should be named cpufreq=try-hwp
> instead, or cpufreq=prefer-hwp or something else like this?

Any new sub-option needs to fit the existing ones in its meaning. I
could see e.g. "cpufreq=xen" alone to effect what you want (once hwp
becomes available for use by default). But (for now at least) I
continue to think that a request for "hwp" ought to mean HWP.

Jan



 


Rackspace

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