DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <anatoly.burakov@intel.com>, <sivaprasad.tummala@amd.com>,
	<dev@dpdk.org>,  <thomas@monjalon.net>, <fengchengwen@huawei.com>,
	<yangxingui@huawei.com>,  <zhanjie9@hisilicon.com>
Subject: Re: [PATCH v1 01/15] power/kvm_vm: enforce enabled lcore ID check
Date: Wed, 22 Apr 2026 17:18:20 +0800	[thread overview]
Message-ID: <6270443d-38f4-4ab9-8898-e6c162867a53@huawei.com> (raw)
In-Reply-To: <20260421072315.2a57d5df@phoenix.local>


On 4/21/2026 10:23 PM, Stephen Hemminger wrote:
> On Fri, 17 Apr 2026 10:51:48 +0800
> "lihuisong (C)" <lihuisong@huawei.com> wrote:
>
>> On 4/16/2026 11:48 PM, Stephen Hemminger wrote:
>>> On Thu, 16 Apr 2026 11:05:58 +0800
>>> Huisong Li <lihuisong@huawei.com> wrote:
>>>   
>>>> The locre ID in cpufreq power must be enabled core in application.
>>> Spelling error, use checkpatch next time, it runs a spell checker.
>>> Also run devtools/check-git-log there other issues in the commit messages.
>> Sorry for this.
>> Yeah, I used checkpatch.sh and check-git-log.sh before sent out.
>> But it didn't found this. I guess that because the "locre" is not a word.
>>>> Use rte_lcore_is_enabled to verify lcore_id.
>>>>
>>>> Fixes: 6f987b594fa6 ("power: refactor core power management")
>>>> Cc: stable@dpdk.org
>>>>
>>>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>>>> ---
>>> The rte_lcore_is_enabled() will return false for service lcores.
>>> Is this a bug or a feature here?
>> My understanding is that the ROLE_RTE core is used to tasks on data
>> plane and the ROLE_SERVICE core is used to periodic or control-plane tasks.
>> Currently, power management in DPDK is mainly processed based on
>> services on the data plane, like the usage in pmd_mgmt or l3fwd-power.
>> However, the tasks on the service cores may also occupy 100% CPU.
>> Therefore, power library or driver should be able to be work with these
>> tasks.
>>   From this perspective, allowing the ROLE_SERVICE core to set power has
>> the least impact on applications in this series.
>> what do you think, Stephen?
>
> Service lcore's are just things doing other work.
> They really should not be doing non-blocking poll, that is a mistake.
> The service cores are intended for control path things.
got it.
>
> The power API should ignore them in general but not break if a user
> calls a power API from a service thread.
What you suggest is that we should allow the service core to 
successfully set the power API?
I know this approach has the least impact.

However, pmd_mgmt lib is also used together with the data plane task of 
network devices.
They should only allow the ROLE_RTE core to use them.
I originally wanted to extract a common macro to verify the lcore in 
power lib.
This common macro is not appropriate to pmd_mgmt lib if this common 
macro counts ROLE_SERVICE core as valid.

But we don't know if aplication having the service core thread used 
cpufreq API.
Although they may not be used in general, it seems that we need allow 
the service core to set the cpufreq API.

  reply	other threads:[~2026-04-22  9:18 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16  3:05 [PATCH v1 00/15] power: unify and improve lcore ID verification Huisong Li
2026-04-16  3:05 ` [PATCH v1 01/15] power/kvm_vm: enforce enabled lcore ID check Huisong Li
2026-04-16 15:48   ` Stephen Hemminger
2026-04-17  2:51     ` lihuisong (C)
2026-04-21 11:07       ` lihuisong (C)
2026-04-21 14:23       ` Stephen Hemminger
2026-04-22  9:18         ` lihuisong (C) [this message]
2026-04-16  3:05 ` [PATCH v1 02/15] power/acpi_cpufreq: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 03/15] power/amd_pstate: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 04/15] power/cppc_cpufreq: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 05/15] power/intel_pstate: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 06/15] power: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 07/15] power: add a common macro to verify lcore ID Huisong Li
2026-04-16  3:06 ` [PATCH v1 08/15] power/pmd_mgmt: replace lcore ID verification with new macro Huisong Li
2026-04-16  3:06 ` [PATCH v1 09/15] power/qos: replace the " Huisong Li
2026-04-16  3:06 ` [PATCH v1 10/15] power/cpufreq: add the lcore ID verification to framework Huisong Li
2026-04-16  3:06 ` [PATCH v1 11/15] power/acpi_cpufreq: remove the verification of lcore ID Huisong Li
2026-04-16  3:06 ` [PATCH v1 12/15] power/amd_pstate: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 13/15] power/cppc_cpufreq: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 14/15] power/intel_pstate: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 15/15] power/kvm_vm: " Huisong Li
2026-04-16 15:51 ` [PATCH v1 00/15] power: unify and improve lcore ID verification Stephen Hemminger
2026-04-17  2:53   ` lihuisong (C)
2026-05-07  2:42 ` [PATCH V2 " Huisong Li
2026-05-07  2:42   ` [PATCH V2 01/15] eal: add interface to check if lcore is EAL managed Huisong Li
2026-05-07  2:42   ` [PATCH V2 02/15] power/kvm_vm: validate lcore role in cpufreq API Huisong Li
2026-05-07  2:42   ` [PATCH V2 03/15] power/acpi_cpufreq: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 04/15] power/amd_pstate: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 05/15] power/cppc_cpufreq: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 06/15] power/intel_pstate: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 07/15] power: add a common macro to verify lcore ID Huisong Li
2026-05-07  2:42   ` [PATCH V2 08/15] power/cpufreq: add the lcore ID verification to framework Huisong Li
2026-05-07  2:42   ` [PATCH V2 09/15] power/acpi_cpufreq: remove the verification of lcore ID Huisong Li
2026-05-07  2:42   ` [PATCH V2 10/15] power/amd_pstate: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 11/15] power/cppc_cpufreq: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 12/15] power/intel_pstate: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 13/15] power/kvm_vm: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 14/15] power: allow the service core to config power QoS Huisong Li
2026-05-07  2:42   ` [PATCH V2 15/15] power: add lcore ID check for PMD mgmt 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=6270443d-38f4-4ab9-8898-e6c162867a53@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=sivaprasad.tummala@amd.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=yangxingui@huawei.com \
    --cc=zhanjie9@hisilicon.com \
    /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