rte_power_qos.h(3)
rte_power_qos.h π
okay bestie, gather round π«Ά this is the manual page for rte_power_qos.h(3) from the DPDK Library Functions Manual, and it's literally the cutest lil power-management header you ever met. it's all about telling your CPU "hey girl, don't sleep too deep, i need you back fast π
". let's get into it.
β¨ NAME β¨
rte_power_qos.h β the PM QoS header, no cap πΈ
π¦ SYNOPSIS π¦
#include <stdint.h>
#include <rte_compat.h>
π 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 π
it's the PM QoS API, periodt.
the tea β: the CPU-wide resume latency limit has a positive impact on this CPU's idle state selection in each cpuidle governor β like, the governor literally checks it when it's deciding how hard to nap. the official kernel lore lives here, go read it iykyk:
here's the vibe check on idle states, and it's giving tradeoff energy π: the deeper the idle state, the lower the power consumption, but the longer the resume time. and some services are just latency sensitive and need a low resume time β think interrupt packet receiving mode, she does not have time to wait.
so in these cases, the per-CPU PM QoS API can be used to control this CPU's idle state selection and limit it to just enter the shallowest idle state, which lows the delay after sleep, by setting a strict resume latency (zero value). strict = zero = "wake up NOW bestie" π
fresh out of the oven β defined in file rte_power_qos.h π
β FUNCTION DOCUMENTATION β
π₯ __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. π so don't get too attached, she's still figuring herself out.
πΈ Parameters
lcore_idβ target logical core id, aka which core you're talking to πlatencyβ The latency should be greater than and equal to zero, in microseconds unit.
π Returns
0on success π- Otherwise, a negative value is returned π
π§ __rte_experimental int rte_power_qos_get_cpu_resume_latency (uint16_t lcore_id)
Warning: EXPERIMENTAL: this API may change without prior notice. π same disclaimer, she's a work in progress.
Get the current resume latency of this logical core π The default value in kernel is (and the page just... trails off there bestie π)
π See also
RTE_POWER_QOS_RESUME_LATENCY_NO_CONSTRAINTβ if you don't set it. use this one, bestie π«Ά
π Returns
- A negative value on failure π
>= 0means the actual resume latency limit on this core β
π AUTHOR π
Generated automatically by Doxygen for DPDK from the source code. not a human, just a very diligent little robot π
okay that's the whole page, you ate it, go forth and set those latencies responsibly π
β¨ shouts out to DPDK, Version 25.11.3, and to rte_power_qos.h(3) for being the main character of this manual page πΈ bye bestie, sleep shallow, wake fast π¦
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms