From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF3C6A04B5; Fri, 2 Oct 2020 16:13:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 868481D919; Fri, 2 Oct 2020 16:12:28 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id F18861D16E for ; Fri, 2 Oct 2020 16:12:20 +0200 (CEST) IronPort-SDR: tISyHewIbDO1eyxvr/Zb8XaK3ZBueKimpY3ny83l6wHG73yHNuDirDnzM4+hCedob5fDmuXjn4 2xaRdsOdHdAQ== X-IronPort-AV: E=McAfee;i="6000,8403,9761"; a="181121546" X-IronPort-AV: E=Sophos;i="5.77,327,1596524400"; d="scan'208";a="181121546" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2020 07:12:20 -0700 IronPort-SDR: aVHoiYAhoIj7oRWOkfuKB25aPAR8Y4WYa9hbwJuXgzGj73UKkXkniqob2QNsN1hVqVo9U0tL8i AqlSDv5k9F1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,327,1596524400"; d="scan'208";a="508807629" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga005.jf.intel.com with ESMTP; 02 Oct 2020 07:12:18 -0700 Received: from sivswdev09.ir.intel.com (sivswdev09.ir.intel.com [10.237.217.48]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 092ECITQ003803; Fri, 2 Oct 2020 15:12:18 +0100 Received: from sivswdev09.ir.intel.com (localhost [127.0.0.1]) by sivswdev09.ir.intel.com with ESMTP id 092ECION025509; Fri, 2 Oct 2020 15:12:18 +0100 Received: (from lma25@localhost) by sivswdev09.ir.intel.com with LOCAL id 092ECIgj025505; Fri, 2 Oct 2020 15:12:18 +0100 From: Liang Ma To: dev@dpdk.org Cc: david.hunt@intel.com, stephen@networkplumber.org, konstantin.ananyev@intel.com, Liang Ma Date: Fri, 2 Oct 2020 15:11:59 +0100 Message-Id: <1601647919-25312-10-git-send-email-liang.j.ma@intel.com> X-Mailer: git-send-email 1.7.7.4 In-Reply-To: <1601647919-25312-1-git-send-email-liang.j.ma@intel.com> References: <1599214740-3927-1-git-send-email-liang.j.ma@intel.com> <1601647919-25312-1-git-send-email-liang.j.ma@intel.com> Subject: [dpdk-dev] [PATCH v4 10/10] doc: update the programming guide for PMD power management X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Update programming guide and sample application l3fwd-power document for PMD power management Signed-off-by: Liang Ma --- doc/guides/prog_guide/power_man.rst | 40 +++++++++++++++++++ .../sample_app_ug/l3_forward_power_man.rst | 15 ++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/doc/guides/prog_guide/power_man.rst b/doc/guides/prog_guide/power_man.rst index 0a3755a901..c95b948874 100644 --- a/doc/guides/prog_guide/power_man.rst +++ b/doc/guides/prog_guide/power_man.rst @@ -188,6 +188,43 @@ API Overview for Empty Poll Power Management * **Detect empty poll state change**: empty poll state change detection algorithm then take action. +PMD Power Management API +------------------------ + +Abstract +~~~~~~~~ +Given existing power management mechanism, developer need change application design or code to use it. +In order to solve the problem, it's very helpful to make the design transparent to application. +The proposed solution is to leverage RX_CALLBACK mechanism which allow three different power management +methodology co exist. The trigger condition is empty poll number beyond defined threshold. + + * umwait/umonitor + + The new umwait/umonitor instruction monitoring the wake address then transfer processor to sub-state. + Once the content of address is changed, the processor will be wake up from the sub-state. Timeout is + setup as well, in case, there is no wake event happen, processor still will wake up after timeout + timer expired. + + * Pause instruction + + Instead of move the core into deeper C state, this lightweight method use Pause instruction + to relief the processor from busy polling. + + * Frequency Scaling + + Reuse exist rte power library to scale up/down core frequency + depend on traffic volume. + +The proposed solution support multiple port and each port can map to multiple core. But 1 core only can map +1 queue(regardless which port). In theory, each queue belongs to same port can apply different power scheme. +It's strongly recommend to use same power scheme for all queues belong to same port. + +API Overview for PMD Power Management +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* **Queue Enable**: Enable specific power scheme for certain queue/port/core + +* **Queue Disable**: Disable power scheme for certain queue/port/core + User Cases ---------- The mechanism can applied to any device which is based on polling. e.g. NIC, FPGA. @@ -200,3 +237,6 @@ References * The :doc:`../sample_app_ug/vm_power_management` chapter in the :doc:`../sample_app_ug/index` section. + +* The :doc:`../sample_app_ug/rxtx_callbacks` + chapter in the :doc:`../sample_app_ug/index` section. diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst index 0cc6f2e62e..82f9ac849c 100644 --- a/doc/guides/sample_app_ug/l3_forward_power_man.rst +++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst @@ -107,7 +107,9 @@ where, * --empty-poll: Traffic Aware power management. See below for details -* --telemetry: Telemetry mode. +* --telemetry: Telemetry mode. + +* --pmd-mgmt: PMD power management mode. See :doc:`l3_forward` for details. The L3fwd-power example reuses the L3fwd command line options. @@ -459,3 +461,14 @@ reference cycles and accordingly busy rate is set to either 0% or The new stats ``empty_poll`` , ``full_poll`` and ``busy_percent`` can be viewed by running the script ``/usertools/dpdk-telemetry-client.py`` and selecting the menu option ``Send for global Metrics``. + +PMD power management Mode +------------------------- + +The PMD power management mode support for ``l3fwd-power`` is a standalone mode, in this mode +``l3fwd-power`` does simple l3fwding along with enable the power saving scheme on specific +port/queue/lcore. Main purpose for this mode is to demonstrate how to use the PMD power management API. + +.. code-block:: console + + ./examples/l3fwd-power/build/l3fwd-power --pmd-mgmt -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" -- 2.17.1