Skip to content

KFunc scx_bpf_cpuperf_set

v6.12

This function set the relative performance target of a CPU.

Definition

Set the target performance level of cpu to perf. perf is in linear relative scale between 0 and SCX_CPUPERF_ONE. This determines how the schedutil cpufreq governor chooses the target frequency.

The actual performance level chosen, CPU grouping, and the overhead and latency of the operations are dependent on the hardware and cpufreq driver in use. Consult hardware and cpufreq documentation for more information. The current performance level can be monitored using scx_bpf_cpuperf_cur.

Returns

cpu: CPU of interest perf: target performance level [0, SCX_CPUPERF_ONE]

Signature

void scx_bpf_cpuperf_set(s32 cpu, u32 perf)

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome