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 653EE43183; Tue, 17 Oct 2023 01:51:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54C244067C; Tue, 17 Oct 2023 01:51:03 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 65C44402BE for ; Tue, 17 Oct 2023 01:51:02 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 942EA20B74C0; Mon, 16 Oct 2023 16:51:01 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 942EA20B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1697500261; bh=7zlBatDzIA8U8fKl3Roqu+kA0vFdxB8k7tEnc1aaOIQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Zq1cEiQyvbjdZJkPHt+db2AJeIw+hKlYUDHfw5LhKXcntP9/7+gGvPgie3P6jAkoH 4flnCfhi72khkkVXS+gpPwosJ5MOB/ZGxQueWAs/rYnpiXwYic4zjMuK09NHHZwoF1 /JTN6fAYkBYJB/blMMiPmcKwKlGAOFGHc9HVIlWo= Date: Mon, 16 Oct 2023 16:51:01 -0700 From: Tyler Retzlaff To: Sivaprasad Tummala Cc: jerinjacobk@gmail.com, harry.van.haaren@intel.com, anatoly.burakov@intel.com, dev@dpdk.org, ferruh.yigit@amd.com, david.hunt@intel.com Subject: Re: [PATCH v1 5/6] power: add eventdev support for power management Message-ID: <20231016235101.GC13553@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20230419095427.563185-1-sivaprasad.tummala@amd.com> <20231016205715.970999-1-sivaprasad.tummala@amd.com> <20231016205715.970999-5-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231016205715.970999-5-sivaprasad.tummala@amd.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 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 > --- > 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