From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CE424A0A03; Mon, 18 Jan 2021 13:41:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A016140E37; Mon, 18 Jan 2021 13:41:44 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id B9121140E36 for ; Mon, 18 Jan 2021 13:41:42 +0100 (CET) IronPort-SDR: 06esS6Dm5HqnW++UJYFZnrNbZc+oLuGn7miSP/MycMa0SWwAWCi2zFQX3lP0SegJgn1kYCxWYb WRu4hAh2GW/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="166464447" X-IronPort-AV: E=Sophos;i="5.79,356,1602572400"; d="scan'208";a="166464447" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 04:41:40 -0800 IronPort-SDR: zKO9AdO0VwI4O0O/eTuLPKyUOiL9QWta29n8uPdF4z96StrDyeoQmCC3I1f5Gw1Gptvj9DWpH4 jZhkJ5AG9nQA== X-IronPort-AV: E=Sophos;i="5.79,356,1602572400"; d="scan'208";a="353494219" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.213.241.53]) ([10.213.241.53]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 04:41:37 -0800 To: Anatoly Burakov , dev@dpdk.org Cc: Liang Ma , Ray Kinsella , Neil Horman , thomas@monjalon.net, konstantin.ananyev@intel.com, timothy.mcdaniel@intel.com, bruce.richardson@intel.com, chris.macnamara@intel.com References: From: David Hunt Message-ID: <786dff25-c6bd-c0a2-563f-4c726955aff5@intel.com> Date: Mon, 18 Jan 2021 12:41:34 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-dev] [PATCH v17 07/11] power: add PMD power management API and callback X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Hi Anatoly, On 14/1/2021 2:46 PM, Anatoly Burakov wrote: > From: Liang Ma > > 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 > Signed-off-by: Anatoly Burakov > --- > > 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