From: "Morten Brørup" <mb@smartsharesystems.com>
To: "lihuisong (C)" <lihuisong@huawei.com>, <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <ferruh.yigit@amd.com>,
<anatoly.burakov@intel.com>, <david.hunt@intel.com>,
<sivaprasad.tummala@amd.com>, <liuyonglong@huawei.com>,
<david.marchand@redhat.com>
Subject: RE: [PATCH v2 1/2] power: introduce PM QoS API on CPU wide
Date: Tue, 18 Jun 2024 14:53:49 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F536@smartserver.smartshare.dk> (raw)
In-Reply-To: <cdc150f0-a35f-37be-8b29-b2a75a7b33be@huawei.com>
> From: lihuisong (C) [mailto:lihuisong@huawei.com]
>
> Hi Morten,
>
> Thanks for your review.
>
>
> 在 2024/6/14 16:04, Morten Brørup 写道:
> >> +#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?
> The cpu_id getting by rte_lcore_to_cpu_id() is from
> lcore_config[lcore_id].core_id which is from
> "/sys/devices/system/cpu/cpuX/topology/core_id" file, please see the
> function eal_cpu_core_id().
> So I think the number in above "cpuX" must be the lcore_id in DPDK.
> And the similar interface in power lib also directly use the locore_id.
Then it should be OK.
Thanks for the detailed answer.
> >
> > @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.
> right, how about use rte_lcore_is_enabled(locore_id)?
I suppose setting latency for service cores should be forbidden too,
so using rte_lcore_is_enabled() to check for ROLE_RTE is correct.
> >
> > 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.
> Ack
> >
> >
> > .
next prev parent reply other threads:[~2024-06-18 12:53 UTC|newest]
Thread overview: 32+ 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
2024-06-18 12:19 ` lihuisong (C)
2024-06-18 12:53 ` Morten Brørup [this message]
2024-06-13 11:20 ` [PATCH v2 2/2] examples/l3fwd-power: add PM QoS configuration Huisong Li
2024-06-19 6:31 ` [PATCH v3 0/2] power: introduce PM QoS interface Huisong Li
2024-06-19 6:31 ` [PATCH v3 1/2] power: introduce PM QoS API on CPU wide Huisong Li
2024-06-19 14:56 ` Stephen Hemminger
2024-06-20 2:22 ` lihuisong (C)
2024-06-19 15:32 ` Thomas Monjalon
2024-06-20 2:32 ` lihuisong (C)
2024-06-19 6:31 ` [PATCH v3 2/2] examples/l3fwd-power: add PM QoS configuration Huisong Li
2024-06-19 14:54 ` Stephen Hemminger
2024-06-20 2:24 ` lihuisong (C)
2024-06-19 6:59 ` [PATCH v3 0/2] power: introduce PM QoS interface Morten Brørup
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=98CBD80474FA8B44BF855DF32C47DC35E9F536@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).