DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Huisong Li" <lihuisong@huawei.com>, <dev@dpdk.org>,
	<david.marchand@redhat.com>
Cc: <thomas@monjalon.net>, <ferruh.yigit@amd.com>,
	<anatoly.burakov@intel.com>, <david.hunt@intel.com>,
	<sivaprasad.tummala@amd.com>, <liuyonglong@huawei.com>
Subject: RE: [PATCH v2 1/2] power: introduce PM QoS API on CPU wide
Date: Fri, 14 Jun 2024 10:04:07 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F520@smartserver.smartshare.dk> (raw)
In-Reply-To: <20240613112038.14271-2-lihuisong@huawei.com>

> +#define PM_QOS_SYSFILE_RESUME_LATENCY_US	\
> +	"/sys/devices/system/cpu/cpu%u/power/pm_qos_resume_latency_us"

Is it OK to access this path using the lcore_id as CPU parameter to open_core_sysfs_file(), or must it be mapped through rte_lcore_to_cpu_id(lcore_id) first?

@David, do you know?

> +
> +int
> +rte_power_qos_set_cpu_resume_latency(uint16_t lcore_id, int latency)
> +{
> +	char buf[BUFSIZ] = {0};
> +	FILE *f;
> +	int ret;
> +
> +	if (lcore_id >= RTE_MAX_LCORE) {
> +		POWER_LOG(ERR, "Lcore id %u can not exceeds %u",
> +			  lcore_id, RTE_MAX_LCORE - 1U);
> +		return -EINVAL;
> +	}

The lcore_id could be a registered non-EAL thread.
You should probably fail in that case.

Same comment for rte_power_qos_get_cpu_resume_latency().


> +#define PM_QOS_STRICT_LATENCY_VALUE             0
> +#define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT    ((int)(UINT32_MAX >> 1))

These definitions are in the public header file, and thus should be RTE_POWER_ prefixed and have comments describing them.


  reply	other threads:[~2024-06-14  8:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 10:55 [PATCH 0/2] introduce PM QoS interface Huisong Li
2024-03-20 10:55 ` [PATCH 1/2] power: " Huisong Li
2024-03-20 10:55 ` [PATCH 2/2] examples/l3fwd-power: add PM QoS request configuration Huisong Li
2024-03-20 14:05 ` [PATCH 0/2] introduce PM QoS interface Morten Brørup
2024-03-21  3:04   ` lihuisong (C)
2024-03-21 13:30     ` Morten Brørup
2024-03-22  8:54       ` lihuisong (C)
2024-03-22 12:35         ` Morten Brørup
2024-03-26  2:11           ` lihuisong (C)
2024-03-26  8:27             ` Morten Brørup
2024-03-26 12:15               ` lihuisong (C)
2024-03-26 12:46                 ` Morten Brørup
2024-03-29  1:59                   ` lihuisong (C)
2024-03-22 17:55         ` Tyler Retzlaff
2024-03-26  2:20           ` lihuisong (C)
2024-03-26 16:04             ` Tyler Retzlaff
2024-06-13 11:20 ` [PATCH v2 0/2] power: " Huisong Li
2024-06-13 11:20   ` [PATCH v2 1/2] power: introduce PM QoS API on CPU wide Huisong Li
2024-06-14  8:04     ` Morten Brørup [this message]
2024-06-13 11:20   ` [PATCH v2 2/2] examples/l3fwd-power: add PM QoS configuration Huisong Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98CBD80474FA8B44BF855DF32C47DC35E9F520@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=anatoly.burakov@intel.com \
    --cc=david.hunt@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=lihuisong@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=sivaprasad.tummala@amd.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).