mbox series

[0/2] cpupower: Allow control of boost feature on non-x86 based systems with boost support.

Message ID 20250522061122.2149188-1-fj5851bi@fujitsu.com
Headers show
Series cpupower: Allow control of boost feature on non-x86 based systems with boost support. | expand

Message

Shinji Nomoto (Fujitsu) May 22, 2025, 6:10 a.m. UTC
The cpufreq subsystem has a generic sysfs interface for controlling boost
(/sys/devices/system/cpu/cpufreq/boost).
The sysfs interface can be used to enable boost control from the cpupower
command on non-x86 platforms as well. So, allow boost controlling on
non-x86 system if boost sysfs file exists.

The set subcommand enables/disables the boost feature using the following
syntax:
  cpupower set --boost 1
  cpupower set --boost 0

The --boost option is an alias for --turbo-boost. We provided the neutral
option name because the name "turbo boost" is specific to Intel technology.

The frequency-info subcommand displays the enabled/disabled state of
the boost feature as follows:
  boost state support:
    Active: yes (or no)

Additionally, there was an existing bug in the option handling,
which I fixed in the first commit.  The fix is independent of the added
functionality.

Shinji Nomoto (2):
  cpupower: Fix a bug where the -t option of the set subcommand was not
    working.
  cpupower: Allow control of boost feature on non-x86 based systems with
    boost support.

 tools/power/cpupower/man/cpupower-set.1      |  7 +-
 tools/power/cpupower/utils/cpufreq-info.c    | 16 ++++-
 tools/power/cpupower/utils/cpupower-set.c    |  5 +-
 tools/power/cpupower/utils/helpers/helpers.h | 14 ++--
 tools/power/cpupower/utils/helpers/misc.c    | 76 ++++++++++++++------
 5 files changed, 83 insertions(+), 35 deletions(-)

Comments

John B. Wyatt IV May 29, 2025, 11:48 a.m. UTC | #1
Hello Shinji, ty for your patch.

On Thu, May 22, 2025 at 03:10:57PM +0900, Shinji Nomoto wrote:
> The cpufreq subsystem has a generic sysfs interface for controlling boost
> (/sys/devices/system/cpu/cpufreq/boost).
> The sysfs interface can be used to enable boost control from the cpupower
> command on non-x86 platforms as well. So, allow boost controlling on
> non-x86 system if boost sysfs file exists.

Did you test this on non-x86 systems? If so, would you please provide
details on those architectures and systems?
Shuah Khan June 2, 2025, 10:37 p.m. UTC | #2
On 5/29/25 05:48, John B. Wyatt IV wrote:
> Hello Shinji, ty for your patch.
> 
> On Thu, May 22, 2025 at 03:10:57PM +0900, Shinji Nomoto wrote:
>> The cpufreq subsystem has a generic sysfs interface for controlling boost
>> (/sys/devices/system/cpu/cpufreq/boost).
>> The sysfs interface can be used to enable boost control from the cpupower
>> command on non-x86 platforms as well. So, allow boost controlling on
>> non-x86 system if boost sysfs file exists.
> 
> Did you test this on non-x86 systems? If so, would you please provide
> details on those architectures and systems?
> 

I applied these to coupower - I will go drop them now.

thanks,
-- Shuah
Shinji Nomoto (Fujitsu) June 3, 2025, 7:16 a.m. UTC | #3
John Wyatt wrote:
> Hello Shinji, ty for your patch.
> 
> On Thu, May 22, 2025 at 03:10:57PM +0900, Shinji Nomoto wrote:
> > The cpufreq subsystem has a generic sysfs interface for controlling 
> > boost (/sys/devices/system/cpu/cpufreq/boost).
> > The sysfs interface can be used to enable boost control from the 
> > cpupower command on non-x86 platforms as well. So, allow boost 
> > controlling on
> > non-x86 system if boost sysfs file exists.
>
> Did you test this on non-x86 systems? If so, would you please provide details on those architectures and systems?

Hello,

This patch has been tested on Arm-based systems.

* It was tested on our internal simulator based on QEMU which supports boost.
* It was tested on the Nvidia grace system (which does not support boost).
* The cppc_cpufreq driver is working on both of the above systems.

We have also confirmed that it continues to work as expected on AMD systems.

Regards.
----
Shinji
John B. Wyatt IV June 20, 2025, 5:26 p.m. UTC | #4
On Wed, Jun 18, 2025 at 03:54:56PM -0600, Shuah Khan wrote:
> On 6/3/25 01:16, Shinji Nomoto (Fujitsu) wrote:
> > John Wyatt wrote:
> > > Did you test this on non-x86 systems? If so, would you please provide details on those architectures and systems?
> > 
> > Hello,
> > 
> > This patch has been tested on Arm-based systems.
> > 
> > * It was tested on our internal simulator based on QEMU which supports boost.
> > * It was tested on the Nvidia grace system (which does not support boost).
> > * The cppc_cpufreq driver is working on both of the above systems.
> > 
> > We have also confirmed that it continues to work as expected on AMD systems.
> > 
> 
> John,
> 
> Let me know if you are good with this testing details.

I have not tested it, but I the testing details are fine.