DPDK  24.11.0-rc3
Functions
rte_power_qos.h File Reference
#include <stdint.h>
#include <rte_compat.h>

Go to the source code of this file.

Functions

__rte_experimental int rte_power_qos_set_cpu_resume_latency (uint16_t lcore_id, int latency)
 
__rte_experimental int rte_power_qos_get_cpu_resume_latency (uint16_t lcore_id)
 

Detailed Description

PM QoS API.

The CPU-wide resume latency limit has a positive impact on this CPU's idle state selection in each cpuidle governor. Please see the PM QoS on CPU wide in the following link: https://www.kernel.org/doc/html/latest/admin-guide/abi-testing.html?highlight=pm_qos_resume_latency_us#abi-sys-devices-power-pm-qos-resume-latency-us

The deeper the idle state, the lower the power consumption, but the longer the resume time. Some services are latency sensitive and request a low resume time, like interrupt packet receiving mode.

In these case, per-CPU PM QoS API can be used to control this CPU's idle state selection and limit just enter the shallowest idle state to low the delay after sleep by setting strict resume latency (zero value).

Definition in file rte_power_qos.h.

Function Documentation

◆ rte_power_qos_set_cpu_resume_latency()

__rte_experimental int rte_power_qos_set_cpu_resume_latency ( uint16_t  lcore_id,
int  latency 
)
Warning
EXPERIMENTAL: this API may change without prior notice.
Parameters
lcore_idtarget logical core id
latencyThe latency should be greater than and equal to zero in microseconds unit.
Returns
0 on success. Otherwise negative value is returned.
Examples:
examples/l3fwd-power/main.c.

◆ rte_power_qos_get_cpu_resume_latency()

__rte_experimental int rte_power_qos_get_cpu_resume_latency ( uint16_t  lcore_id)
Warning
EXPERIMENTAL: this API may change without prior notice.

Get the current resume latency of this logical core. The default value in kernel is

See also
RTE_POWER_QOS_RESUME_LATENCY_NO_CONSTRAINT if don't set it.
Returns
Negative value on failure. >= 0 means the actual resume latency limit on this core.
Examples:
examples/l3fwd-power/main.c.