All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Jason Andryuk" <jandryuk@gmail.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 04/14 RESEND] cpufreq: Add Hardware P-State (HWP) driver
Date: Fri, 12 May 2023 03:02:07 +0200	[thread overview]
Message-ID: <ZF2QEBZz25Bi5R0l@mail-itl> (raw)
In-Reply-To: <e9dd85d3-0e97-cb96-561e-75b23386a7a3@suse.com>

[-- Attachment #1: Type: text/plain, Size: 2465 bytes --]

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@suse.com> wrote:
> >> On 05.05.2023 17:35, Jason Andryuk wrote:
> >>> On Fri, May 5, 2023 at 3:01 AM Jan Beulich <jbeulich@suse.com> 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?

> > 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
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2023-05-12  1:02 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 19:30 [PATCH v3 00/14 RESEND] Intel Hardware P-States (HWP) support Jason Andryuk
2023-05-01 19:30 ` [PATCH v3 01/14 RESEND] cpufreq: Allow restricting to internal governors only Jason Andryuk
2023-05-01 19:30 ` [PATCH v3 02/14 RESEND] cpufreq: Add perf_freq to cpuinfo Jason Andryuk
2023-05-01 19:30 ` [PATCH v3 03/14 RESEND] cpufreq: Export intel_feature_detect Jason Andryuk
2023-05-04 11:16   ` Jan Beulich
2023-05-01 19:30 ` [PATCH v3 04/14 RESEND] cpufreq: Add Hardware P-State (HWP) driver Jason Andryuk
2023-05-04 13:11   ` Jan Beulich
2023-05-04 16:56     ` Jason Andryuk
2023-05-05  7:01       ` Jan Beulich
2023-05-05 15:35         ` Jason Andryuk
2023-05-08  6:33           ` Jan Beulich
2023-05-10 13:54             ` Jason Andryuk
2023-05-10 14:19               ` Jan Beulich
2023-05-12  1:02                 ` Marek Marczykowski-Górecki [this message]
2023-05-12  6:28                   ` Jan Beulich
2023-05-01 19:30 ` [PATCH v3 05/14 RESEND] xenpm: Change get-cpufreq-para output for internal Jason Andryuk
2023-05-04 14:35   ` Jan Beulich
2023-05-04 17:00     ` Jason Andryuk
2023-05-05  7:04       ` Jan Beulich
2023-05-05 15:40         ` Jason Andryuk
2023-05-01 19:30 ` [PATCH v3 06/14 RESEND] xen/x86: Tweak PDC bits when using HWP Jason Andryuk
2023-05-08  9:53   ` Jan Beulich
2023-05-10 14:08     ` Jason Andryuk
2023-05-01 19:30 ` [PATCH v3 07/14 RESEND] cpufreq: Export HWP parameters to userspace Jason Andryuk
2023-05-08 10:25   ` Jan Beulich
2023-05-08 10:46     ` Jan Beulich
2023-05-10 17:49       ` Jason Andryuk
2023-05-11  6:21         ` Jan Beulich
2023-05-11 13:49           ` Jason Andryuk
2023-05-11 14:10             ` Jan Beulich
2023-05-11 20:22               ` Jason Andryuk
2023-05-12  6:32                 ` Jan Beulich
2023-05-01 19:30 ` [PATCH v3 08/14 RESEND] libxc: Include hwp_para in definitions Jason Andryuk
2023-05-19 13:53   ` Anthony PERARD
2023-05-01 19:30 ` [PATCH v3 09/14 RESEND] xenpm: Print HWP parameters Jason Andryuk
2023-05-08 10:43   ` Jan Beulich
2023-05-10 18:11     ` Jason Andryuk
2023-05-11  6:25       ` Jan Beulich
2023-05-01 19:30 ` [PATCH v3 10/14 RESEND] xen: Add SET_CPUFREQ_HWP xen_sysctl_pm_op Jason Andryuk
2023-05-08 11:27   ` Jan Beulich
2023-05-22 12:45     ` Jason Andryuk
2023-05-22 13:10       ` Jan Beulich
2023-05-22 14:43         ` Jason Andryuk
2023-05-01 19:30 ` [PATCH v3 11/14 RESEND] libxc: Add xc_set_cpufreq_hwp Jason Andryuk
2023-05-19 13:55   ` Anthony PERARD
2023-05-01 19:30 ` [PATCH v3 12/14 RESEND] xenpm: Factor out a non-fatal cpuid_parse variant Jason Andryuk
2023-05-08 12:01   ` Jan Beulich
2023-05-01 19:30 ` [PATCH v3 13/14 RESEND] xenpm: Add set-cpufreq-hwp subcommand Jason Andryuk
2023-05-08 11:56   ` Jan Beulich
2023-05-08 12:00     ` Jan Beulich
2023-05-22 12:59     ` Jason Andryuk
2023-05-22 13:20       ` Jan Beulich
2023-05-01 19:30 ` [PATCH v3 14/14 RESEND] CHANGELOG: Add Intel HWP entry Jason Andryuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZF2QEBZz25Bi5R0l@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jandryuk@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.