Hi Stephen,

Thanks for your review.

在 2024/6/19 22:56, Stephen Hemminger 写道:
On Wed, 19 Jun 2024 14:31:43 +0800
Huisong Li <lihuis...@huawei.com> wrote:

+PM QoS
+------
+
+The deeper the idle state, the lower the power consumption, but the longer
+the resume time. Some service are delay sensitive and very except the low
+resume time, like interrupt packet receiving mode.
+
+And the "/sys/devices/system/cpu/cpuX/power/pm_qos_resume_latency_us" sysfs
+interface is used to set and get the resume latency limit on the cpuX for
+userspace. Each cpuidle governor in Linux select which idle state to enter
+based on this CPU resume latency in their idle task.
+
+The per-CPU PM QoS API can be used to set and get the CPU resume latency.
+
+The ``rte_power_qos_set_cpu_resume_latency()`` function can effect the work
+CPU's idle state selection and just allow to enter the shallowest idle state
+if set to zero (strict resume latency) for this CPU.
+
+The ``rte_power_qos_get_cpu_resume_latency()`` function can obtain the resume
+latency on specified CPU.
+
Wording of this is hard to read and needs to be reworded for clarity.
Explain more what PM QoS is to the user.

Yes, it's very important. How do you feel about the following description?

-->

The deeper the idle state, the lower the power consumption, but the longer
the resume time. Some service are delay sensitive and very except the low
resume time, like interrupt packet receiving mode.

And the "/sys/devices/system/cpu/cpuX/power/pm_qos_resume_latency_us" sysfs
interface is used to set and get the resume latency limit on the cpuX for
userspace. Each cpuidle governor in Linux select which idle state to enter
based on this CPU resume latency in their idle task.

The per-CPU PM QoS API can be used to set and get the CPU resume latency based
on this sysfs.

The ``rte_power_qos_set_cpu_resume_latency()`` function can control the CPU's idle state selection in Linux and limit just to enter the shallowest idle state
to low the delay of resuming service after sleeping by setting strict resume
latency (zero value).

The ``rte_power_qos_get_cpu_resume_latency()`` function can get the resume
latency on specified CPU.

Also, not sure if details about sysfs implementation is helpful.
It's just a short background.
IMO, it is helpful for user to make sense of this API.
Should also say this is Linux only.
.

Reply via email to