[dpdk-dev] [PATCH v17 07/11] power: add PMD power management API and callback
David Hunt
david.hunt at intel.com
Mon Jan 18 13:41:34 CET 2021
Hi Anatoly,
On 14/1/2021 2:46 PM, Anatoly Burakov wrote:
> From: Liang Ma <liang.j.ma at intel.com>
>
> Add a simple on/off switch that will enable saving power when no
> packets are arriving. It is based on counting the number of empty
> polls and, when the number reaches a certain threshold, entering an
> architecture-defined optimized power state that will either wait
> until a TSC timestamp expires, or when packets arrive.
>
> This API mandates a core-to-single-queue mapping (that is, multiple
> queued per device are supported, but they have to be polled on different
> cores).
>
> This design is using PMD RX callbacks.
>
> 1. UMWAIT/UMONITOR:
>
> When a certain threshold of empty polls is reached, the core will go
> into a power optimized sleep while waiting on an address of next RX
> descriptor to be written to.
>
> 2. TPAUSE/Pause instruction
>
> This method uses the pause (or TPAUSE, if available) instruction to
> avoid busy polling.
>
> 3. Frequency scaling
> Reuse existing DPDK power library to scale up/down core frequency
> depending on traffic volume.
>
> Signed-off-by: Liang Ma <liang.j.ma at intel.com>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>
> Notes:
> v17:
> - Added memory barriers suggested by Konstantin
> - Removed the BUSY state
>
> doc/guides/prog_guide/power_man.rst | 44 +++
> doc/guides/rel_notes/release_21_02.rst | 10 +
> lib/librte_power/meson.build | 5 +-
> lib/librte_power/rte_power_pmd_mgmt.c | 364 +++++++++++++++++++++++++
> lib/librte_power/rte_power_pmd_mgmt.h | 90 ++++++
> lib/librte_power/version.map | 5 +
> 6 files changed, 516 insertions(+), 2 deletions(-)
> create mode 100644 lib/librte_power/rte_power_pmd_mgmt.c
> create mode 100644 lib/librte_power/rte_power_pmd_mgmt.h
>
Acked-by: David Hunt <david.hunt at intel.com>
More information about the dev
mailing list