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:

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

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

  • 0 on 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 😭
  • >= 0 means 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