With this builtin function it is possible to write now:
[variables]
pstate=${f:intel_recommended_pstate}
[bootloader]
cmdline_pstate=+intel_pstate=${pstate}
The builtin function will return value: disable|active based on the processor
model and pass the proper intel_pstate value to kernel command line in boot time
................................
Intel recommends to use the intel_pstate CPUFreq driver in active mode with HWP
enabled on Ice Lake and later generations processors.This feature allows dynamically
set intel_pstate based on the processor's model. Currently, users need to create a
tuned override if they want to set intel_pstate to active even for newer generation processors.
For older generation processors setting pstate to active can introduce jitters which were
historically seen around and tested with RHEL-7.4.From IceLake generation, intel has fixed these issues.
Signed-off-by: Sabbir Hasan <sahasan@redhat.com>
60 lines
1.9 KiB
Text
60 lines
1.9 KiB
Text
:_module-type: REFERENCE
|
|
[id="built-in-functions-available-in-tuned-profiles_{context}"]
|
|
= Built-in functions available in TuneD profiles
|
|
|
|
[role="_abstract"]
|
|
The following built-in functions are available in all *TuneD* profiles:
|
|
|
|
`PROFILE_DIR`::
|
|
Returns the directory path where the profile and the `tuned.conf` file are located.
|
|
|
|
`exec`::
|
|
Executes a process and returns its output.
|
|
|
|
`assertion`::
|
|
Compares two arguments. If they _do not match_, the function logs text from the first argument and aborts profile loading.
|
|
|
|
`assertion_non_equal`::
|
|
Compares two arguments. If they _match_, the function logs text from the first argument and aborts profile loading.
|
|
|
|
`kb2s`::
|
|
Converts kilobytes to disk sectors.
|
|
|
|
`s2kb`::
|
|
Converts disk sectors to kilobytes.
|
|
|
|
`strip`::
|
|
Creates a string from all passed arguments and deletes both leading and trailing white space.
|
|
|
|
`virt_check`::
|
|
Checks whether *TuneD* is running inside a virtual machine (VM) or on bare metal:
|
|
+
|
|
* Inside a VM, the function returns the first argument.
|
|
* On bare metal, the function returns the second argument, even in case of an error.
|
|
|
|
`cpulist_invert`::
|
|
Inverts a list of CPUs to make its complement. For example, on a system with 4 CPUs, numbered from 0 to 3, the inversion of the list `0,2,3` is `1`.
|
|
|
|
`cpulist2hex`::
|
|
Converts a CPU list to a hexadecimal CPU mask.
|
|
|
|
`cpulist2hex_invert`::
|
|
Converts a CPU list to a hexadecimal CPU mask and inverts it.
|
|
|
|
`hex2cpulist`::
|
|
Converts a hexadecimal CPU mask to a CPU list.
|
|
|
|
`cpulist_online`::
|
|
Checks whether the CPUs from the list are online. Returns the list containing only online CPUs.
|
|
|
|
`cpulist_present`::
|
|
Checks whether the CPUs from the list are present. Returns the list containing only present CPUs.
|
|
|
|
`cpulist_unpack`::
|
|
Unpacks a CPU list in the form of `1-3,4` to `1,2,3,4`.
|
|
|
|
`cpulist_pack`::
|
|
Packs a CPU list in the form of `1,2,3,5` to `1-3,5`.
|
|
|
|
`intel_recommended_pstate`::
|
|
Returns recommended intel_pstate CPUFreq driver mode based on processor generation.
|