X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fguides%2Fprog_guide%2Fpower_man.rst;h=e387d7811e13eb7170c75d47ac50dca026375886;hb=dd22740cc291568f354279f5c38eef4a1d1dd3a0;hp=68b7e8b64c848e8614269adda9bbe9529c4810cf;hpb=450f0791312ccc82f5b28f8a93986936779f0a54;p=dpdk.git diff --git a/doc/guides/prog_guide/power_man.rst b/doc/guides/prog_guide/power_man.rst index 68b7e8b64c..e387d7811e 100644 --- a/doc/guides/prog_guide/power_man.rst +++ b/doc/guides/prog_guide/power_man.rst @@ -184,7 +184,7 @@ API Overview for Empty Poll Power Management * **Update Valid Poll Counter**: update the valid poll counter. -* **Set the Fequence Index**: update the power state/frequency mapping. +* **Set the Frequency Index**: update the power state/frequency mapping. * **Detect empty poll state change**: empty poll state change detection algorithm then take action. @@ -192,9 +192,71 @@ User Cases ---------- The mechanism can applied to any device which is based on polling. e.g. NIC, FPGA. +Ethernet PMD Power Management API +--------------------------------- + +Abstract +~~~~~~~~ + +Existing power management mechanisms require developers to change application +design or change code to make use of it. The PMD power management API provides a +convenient alternative by utilizing Ethernet PMD RX callbacks, and triggering +power saving whenever empty poll count reaches a certain number. + +* Monitor + This power saving scheme will put the CPU into optimized power state and + monitor the Ethernet PMD RX descriptor address, waking the CPU up whenever + there's new traffic. Support for this scheme may not be available on all + platforms, and further limitations may apply (see below). + +* Pause + This power saving scheme will avoid busy polling by either entering + power-optimized sleep state with ``rte_power_pause()`` function, or, if it's + not supported by the underlying platform, use ``rte_pause()``. + +* Frequency scaling + This power saving scheme will use ``librte_power`` library functionality to + scale the core frequency up/down depending on traffic volume. + +The "monitor" mode is only supported in the following configurations and scenarios: + +* On Linux* x86_64, `rte_power_monitor()` requires WAITPKG instruction set being + supported by the CPU, while `rte_power_monitor_multi()` requires WAITPKG and + RTM instruction sets being supported by the CPU. RTM instruction set may also + require booting the Linux with `tsx=on` command line parameter. Please refer + to your platform documentation for further information. + +* If ``rte_cpu_get_intrinsics_support()`` function indicates that + ``rte_power_monitor_multi()`` function is supported by the platform, then + monitoring multiple Ethernet Rx queues for traffic will be supported. + +* If ``rte_cpu_get_intrinsics_support()`` function indicates that only + ``rte_power_monitor()`` is supported by the platform, then monitoring will be + limited to a mapping of 1 core 1 queue (thus, each Rx queue will have to be + monitored from a different lcore). + +* If ``rte_cpu_get_intrinsics_support()`` function indicates that neither of the + two monitoring functions are supported, then monitor mode will not be supported. + +* Not all Ethernet drivers support monitoring, even if the underlying + platform may support the necessary CPU instructions. Please refer to + :doc:`../nics/overview` for more information. + + +API Overview for Ethernet PMD Power Management +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* **Queue Enable**: Enable specific power scheme for certain queue/port/core. + +* **Queue Disable**: Disable power scheme for certain queue/port/core. + References ---------- -* l3fwd-power: The sample application in DPDK that performs L3 forwarding with power management. +* The :doc:`../sample_app_ug/l3_forward_power_man` + chapter in the :doc:`../sample_app_ug/index` section. + +* The :doc:`../sample_app_ug/vm_power_management` + chapter in the :doc:`../sample_app_ug/index` section. -* The "L3 Forwarding with Power Management Sample Application" chapter in the *DPDK Sample Application's User Guide*. +* The :doc:`../nics/overview` chapter in the :doc:`../nics/index` section