On Mon, Oct 16, 2023 at 01:57:14PM -0700, Sivaprasad Tummala wrote: > Add eventdev support to enable power saving when no events > 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 events arrive. > > This API mandates a core-to-single-port mapping (i.e. one core polling > multiple ports of event device is not supported). This should be ok > as the general use case will have one CPU core using one port to > enqueue/dequeue events from an eventdev. > > This design is using Eventdev PMD Dequeue callbacks. > > 1. MWAITX/MONITORX: > > 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. Pause instruction > > This method uses the pause instruction to avoid busy polling. > > Signed-off-by: Sivaprasad Tummala <sivaprasad.tumm...@amd.com> > --- > lib/power/meson.build | 2 +- > lib/power/rte_power_pmd_mgmt.c | 226 +++++++++++++++++++++++++++++++++ > lib/power/rte_power_pmd_mgmt.h | 55 ++++++++ > lib/power/version.map | 4 + > 4 files changed, 286 insertions(+), 1 deletion(-) >
... > + > + # added in 23.07 > + rte_power_eventdev_pmgmt_port_enable; > + rte_power_eventdev_pmgmt_port_disable; 23.07 is released, 23.11? > }; > -- > 2.34.1