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 4A302454AC; Wed, 19 Jun 2024 17:33:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBD4641149; Wed, 19 Jun 2024 17:33:35 +0200 (CEST) Received: from fout1-smtp.messagingengine.com (fout1-smtp.messagingengine.com [103.168.172.144]) by mails.dpdk.org (Postfix) with ESMTP id B69C840289 for ; Wed, 19 Jun 2024 17:32:45 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 31BA313801CA; Wed, 19 Jun 2024 11:32:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 19 Jun 2024 11:32:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1718811165; x=1718897565; bh=mJgdnhA4DCA/9mZrWG8ZQm4mvJSglWPoZU1qpTgRQrA=; b= Q9ciFN+d8fZfr2TaAdG7BGcvzaXM1E5ah9jnocTknWxWZ/I0/dz9ZQwhh5YT/afi T/BmUhaxBHi+TG+9/IQ/bOhoZJ5QsnUjZwaS8UQ0o2usSE6zK2Eja6EF5IKwQkCD U3WmjFbEWRdxPiqS6Jr5gZ0OVleDg4Cy6BGVSuROhh1o5CvTO7UUBa1wceZSDIrR RjFBrStlkHo/Q6qFPih6N5WkTYiH2toejIc6LtpUlh3b0hvyOV9E90BWGzK/B98m D4MtURM3E0UcaYIIgVkG3EXS2IvQUwIXYJPDBaXRX6r0Zyk1f8+3NuWpkXWqjXK0 rzyb1XqZfWzh98Nbd7zqMA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718811165; x= 1718897565; bh=mJgdnhA4DCA/9mZrWG8ZQm4mvJSglWPoZU1qpTgRQrA=; b=H tCkfd/gXplA1+R+68EStSyJgG4kgFyZhYq2UtWD42P81hCQR2jhX+XM/u+AU8MVF 0lO4i/iqf/l0CT0kR4eha8y+2VqCUv/J0/WAnlSoNhlxuhG75VuhWCsMsPBQO7NS tAoYf0+WON+yX6hDOVSiJcD3rqtnF7E1Avx3803/es9qC2C2dG1A838cup5+tc8G W9UwXJmpoAQFp+B+n2eG+ZxA7gXL3xDdipDMoZY281o+KP9tvS4DEQxEUw+ZdtT4 HEbM3P4eq+ekFfpUWhccqpL/dCz5Zms2ct9mIzUe5dA7EbnrVuANa/d7HkYJLQKc RYFTM3CQ2nJlwrtaiP9yA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeftddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeejvdeileeigefhgeelkedvleduffejfeeuueduiedvveegudef veeiueegfedtieenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Jun 2024 11:32:41 -0400 (EDT) From: Thomas Monjalon To: Huisong Li Cc: dev@dpdk.org, mb@smartsharesystems.com, ferruh.yigit@amd.com, anatoly.burakov@intel.com, david.hunt@intel.com, sivaprasad.tummala@amd.com, david.marchand@redhat.com, liuyonglong@huawei.com, lihuisong@huawei.com Subject: Re: [PATCH v3 1/2] power: introduce PM QoS API on CPU wide Date: Wed, 19 Jun 2024 17:32:37 +0200 Message-ID: <6796230.uz5P2jW1tq@thomas> In-Reply-To: <20240619063144.20733-2-lihuisong@huawei.com> References: <20240320105529.5626-1-lihuisong@huawei.com> <20240619063144.20733-1-lihuisong@huawei.com> <20240619063144.20733-2-lihuisong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 19/06/2024 08:31, Huisong Li: > --- /dev/null > +++ b/lib/power/rte_power_qos.h > @@ -0,0 +1,71 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2024 HiSilicon Limited > + */ > + > +#ifndef RTE_POWER_QOS_H > +#define RTE_POWER_QOS_H > + > +#include > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/** > + * @file rte_power_qos.h > + * > + * PM QoS API. > + * > + * The CPU-wide resume latency limit has a positive impact on this CPU's idle > + * state selection in each cpuidle governor. > + * Please see the PM QoS on CPU wide in the following link: > + * https://www.kernel.org/doc/html/latest/admin-guide/abi-testing.html?highlight=pm_qos_resume_latency_us#abi-sys-devices-power-pm-qos-resume-latency-us > + * > + * The deeper the idle state, the lower the power consumption, but the > + * longer the resume time. Some service are delay sensitive and very except the > + * low resume time, like interrupt packet receiving mode. > + * > + * In these case, per-CPU PM QoS API can be used to control this CPU's idle > + * state selection and limit just enter the shallowest idle state to low the > + * delay after sleep by setting strict resume latency (zero value). > + */ > + > +#define RTE_POWER_QOS_STRICT_LATENCY_VALUE 0 > +#define RTE_POWER_QOS_RESUME_LATENCY_NO_CONSTRAINT ((int)(UINT32_MAX >> 1)) stdint.h include is missing