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 B181D45491; Thu, 20 Jun 2024 04:33:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99458415D7; Thu, 20 Jun 2024 04:33:05 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 7BB4940BA2 for ; Thu, 20 Jun 2024 04:33:03 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4W4PZb2FrdzPrdN; Thu, 20 Jun 2024 10:29:27 +0800 (CST) Received: from kwepemm600004.china.huawei.com (unknown [7.193.23.242]) by mail.maildlp.com (Postfix) with ESMTPS id C263D140120; Thu, 20 Jun 2024 10:33:00 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 20 Jun 2024 10:33:00 +0800 Message-ID: <41ee70c3-5113-5c3e-7a5a-56e34bc9fffe@huawei.com> Date: Thu, 20 Jun 2024 10:32:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v3 1/2] power: introduce PM QoS API on CPU wide To: Thomas Monjalon CC: , , , , , , , References: <20240320105529.5626-1-lihuisong@huawei.com> <20240619063144.20733-1-lihuisong@huawei.com> <20240619063144.20733-2-lihuisong@huawei.com> <6796230.uz5P2jW1tq@thomas> From: "lihuisong (C)" In-Reply-To: <6796230.uz5P2jW1tq@thomas> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600004.china.huawei.com (7.193.23.242) 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 在 2024/6/19 23:32, Thomas Monjalon 写道: > 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 Yes, it desn't satisfy self-contained header files. will add it in next version, thanks. > > > > .