How to enable/disable Intel turbo boost technology


Jianjie Lin
 

Hello acrn project teams,

 

Here I would like to ask about the Enable and Disable feature of Intel turbo boost technology.

As I know that for a PC if I want to disable the intel turbo boost technology, I need to set the BIOS setting before booting the system.

But for the hypervisor type1, I would like to ask if it is possible to set the turbo boost technology for each UOSs individually.

 

For example, I have to UOSs: Uos1, Uos2.

I want to enable the turbo boost technology in the UOS1 but disable this feature in the UOS2.

 

I found the device model parameter offers a flag.

-B, --bootargs <bootargs>

    Set the User VM kernel command-line arguments. The maximum length is 1023. The bootargs string will be passed to the kernel as its cmdline.

    Example:

    -B "loglevel=7"

    specifies the kernel log level at 7

 

Therefore, I would like to ask if it is possible to use this flag for setting this parameter. If it is possible, how can I write the cmdline?

Thank you very much for your support.

 

Cheers

Jianjie Lin

 


Victor Sun
 

Hi Jianjie,

The CPU turbo could be enabled for each VM only when the pinned pCPU is wholly assigned to one VM, i.e. no CPU sharing between VMs.

ACRN provides ACPI P state table for post-launched VM so UOS kernel could enable P state by either acpi-cpufreq driver or intel_pstate driver if pCPU support intel_pstate.

For pre-launched VM, only intel_pstate is supported.

 

Yes we can use different device model parameter to enable/disable turbo by returning modified vCPUID result, but currently we have no plan to implement it.

For Linux guest, you can simply add kernel parameter of “cpufreq.off=1” to disable turbo.

 

BR,

Victor

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of Jianjie Lin
Sent: Tuesday, August 3, 2021 5:00 PM
To: acrn-users@...
Subject: [acrn-users] How to enable/disable Intel turbo boost technology

 

Hello acrn project teams,

 

Here I would like to ask about the Enable and Disable feature of Intel turbo boost technology.

As I know that for a PC if I want to disable the intel turbo boost technology, I need to set the BIOS setting before booting the system.

But for the hypervisor type1, I would like to ask if it is possible to set the turbo boost technology for each UOSs individually.

 

For example, I have to UOSs: Uos1, Uos2.

I want to enable the turbo boost technology in the UOS1 but disable this feature in the UOS2.

 

I found the device model parameter offers a flag.

-B, --bootargs <bootargs>

    Set the User VM kernel command-line arguments. The maximum length is 1023. The bootargs string will be passed to the kernel as its cmdline.

    Example:

    -B "loglevel=7"

    specifies the kernel log level at 7

 

Therefore, I would like to ask if it is possible to use this flag for setting this parameter. If it is possible, how can I write the cmdline?

Thank you very much for your support.

 

Cheers

Jianjie Lin

 


Jianjie Lin
 

Hi Victor,

 

Thank you very much for your quick response.

In order to avoid the misunderstanding, I would like to make sure the meaning of the pcpu in your response that, you mean pcpu as core or a real CPU.?

 

Since in the whiskey lake, we have only one CPU but it contains 4 Cores.

In my scenario, I assign the Core1 and Core2 to the UOS1 and the Core 3 and Core4 to UOS2.

 

Now, what I want is to enable the turbo boost in the Core1 and Core2 for UOS1, but disable this feature in Core3 and Core4 for UOS2

By using the “cpufreq.off=1” in the bootargs setting can make it possible?

Thank you again for your support.

BR,

Jianjie

 

 

Von: acrn-users@... [mailto:acrn-users@...] Im Auftrag von Victor Sun
Gesendet: Dienstag, 3. August 2021 15:50
An: acrn-users@...
Betreff: Re: [acrn-users] How to enable/disable Intel turbo boost technology

 

Hi Jianjie,

The CPU turbo could be enabled for each VM only when the pinned pCPU is wholly assigned to one VM, i.e. no CPU sharing between VMs.

ACRN provides ACPI P state table for post-launched VM so UOS kernel could enable P state by either acpi-cpufreq driver or intel_pstate driver if pCPU support intel_pstate.

For pre-launched VM, only intel_pstate is supported.

 

Yes we can use different device model parameter to enable/disable turbo by returning modified vCPUID result, but currently we have no plan to implement it.

For Linux guest, you can simply add kernel parameter of “cpufreq.off=1” to disable turbo.

 

BR,

Victor

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of Jianjie Lin
Sent: Tuesday, August 3, 2021 5:00 PM
To: acrn-users@...
Subject: [acrn-users] How to enable/disable Intel turbo boost technology

 

Hello acrn project teams,

 

Here I would like to ask about the Enable and Disable feature of Intel turbo boost technology.

As I know that for a PC if I want to disable the intel turbo boost technology, I need to set the BIOS setting before booting the system.

But for the hypervisor type1, I would like to ask if it is possible to set the turbo boost technology for each UOSs individually.

 

For example, I have to UOSs: Uos1, Uos2.

I want to enable the turbo boost technology in the UOS1 but disable this feature in the UOS2.

 

I found the device model parameter offers a flag.

-B, --bootargs <bootargs>

    Set the User VM kernel command-line arguments. The maximum length is 1023. The bootargs string will be passed to the kernel as its cmdline.

    Example:

    -B "loglevel=7"

    specifies the kernel log level at 7

 

Therefore, I would like to ask if it is possible to use this flag for setting this parameter. If it is possible, how can I write the cmdline?

Thank you very much for your support.

 

Cheers

Jianjie Lin

 


Victor Sun
 

Yes you got it.

 

BR,

Victor

 

From: acrn-users@... <acrn-users@...> On Behalf Of Jianjie Lin
Sent: Tuesday, August 3, 2021 10:18 PM
To: acrn-users@...
Subject: Re: [acrn-users] How to enable/disable Intel turbo boost technology

 

Hi Victor,

 

Thank you very much for your quick response.

In order to avoid the misunderstanding, I would like to make sure the meaning of the pcpu in your response that, you mean pcpu as core or a real CPU.?

 

Since in the whiskey lake, we have only one CPU but it contains 4 Cores.

In my scenario, I assign the Core1 and Core2 to the UOS1 and the Core 3 and Core4 to UOS2.

 

Now, what I want is to enable the turbo boost in the Core1 and Core2 for UOS1, but disable this feature in Core3 and Core4 for UOS2

By using the “cpufreq.off=1” in the bootargs setting can make it possible?

Thank you again for your support.

BR,

Jianjie

 

 

Von: acrn-users@... [mailto:acrn-users@...] Im Auftrag von Victor Sun
Gesendet: Dienstag, 3. August 2021 15:50
An: acrn-users@...
Betreff: Re: [acrn-users] How to enable/disable Intel turbo boost technology

 

Hi Jianjie,

The CPU turbo could be enabled for each VM only when the pinned pCPU is wholly assigned to one VM, i.e. no CPU sharing between VMs.

ACRN provides ACPI P state table for post-launched VM so UOS kernel could enable P state by either acpi-cpufreq driver or intel_pstate driver if pCPU support intel_pstate.

For pre-launched VM, only intel_pstate is supported.

 

Yes we can use different device model parameter to enable/disable turbo by returning modified vCPUID result, but currently we have no plan to implement it.

For Linux guest, you can simply add kernel parameter of “cpufreq.off=1” to disable turbo.

 

BR,

Victor

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of Jianjie Lin
Sent: Tuesday, August 3, 2021 5:00 PM
To: acrn-users@...
Subject: [acrn-users] How to enable/disable Intel turbo boost technology

 

Hello acrn project teams,

 

Here I would like to ask about the Enable and Disable feature of Intel turbo boost technology.

As I know that for a PC if I want to disable the intel turbo boost technology, I need to set the BIOS setting before booting the system.

But for the hypervisor type1, I would like to ask if it is possible to set the turbo boost technology for each UOSs individually.

 

For example, I have to UOSs: Uos1, Uos2.

I want to enable the turbo boost technology in the UOS1 but disable this feature in the UOS2.

 

I found the device model parameter offers a flag.

-B, --bootargs <bootargs>

    Set the User VM kernel command-line arguments. The maximum length is 1023. The bootargs string will be passed to the kernel as its cmdline.

    Example:

    -B "loglevel=7"

    specifies the kernel log level at 7

 

Therefore, I would like to ask if it is possible to use this flag for setting this parameter. If it is possible, how can I write the cmdline?

Thank you very much for your support.

 

Cheers

Jianjie Lin