From: Ferruh Yigit <ferruh.yigit@amd.com>
To: David Marchand <david.marchand@redhat.com>,
"Tummala, Sivaprasad" <Sivaprasad.Tummala@amd.com>,
"david.hunt@intel.com" <david.hunt@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Thomas Monjalon <thomas@monjalon.net>,
"Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [PATCH v2 1/3] eal: add x86 cpuid support for monitorx
Date: Fri, 14 Apr 2023 12:48:48 +0100 [thread overview]
Message-ID: <c586ab87-0297-0ed2-61b6-b819d961f758@amd.com> (raw)
In-Reply-To: <CAJFAV8yofoo4R-NEqAQj6uUBsuCbNk-tS3s2yNWGrupSM7xgjg@mail.gmail.com>
On 4/14/2023 8:05 AM, David Marchand wrote:
> On Thu, Apr 13, 2023 at 7:51 PM Tummala, Sivaprasad
> <Sivaprasad.Tummala@amd.com> wrote:
>>
>> [AMD Official Use Only - General]
>>
>> Hi David,
>>
>>> -----Original Message-----
>>> From: David Marchand <david.marchand@redhat.com>
>>> Sent: Thursday, April 13, 2023 5:30 PM
>>> To: Tummala, Sivaprasad <Sivaprasad.Tummala@amd.com>
>>> Cc: david.hunt@intel.com; dev@dpdk.org; Thomas Monjalon
>>> <thomas@monjalon.net>; Burakov, Anatoly <anatoly.burakov@intel.com>
>>> Subject: Re: [PATCH v2 1/3] eal: add x86 cpuid support for monitorx
>>>
>>> Caution: This message originated from an External Source. Use proper caution
>>> when opening attachments, clicking links, or responding.
>>>
>>>
>>> On Thu, Apr 13, 2023 at 1:54 PM Sivaprasad Tummala
>>> <sivaprasad.tummala@amd.com> wrote:
>>>>
>>>> Add a new CPUID flag to indicate support for monitorx instruction on
>>>> AMD Epyc processors.
>>>>
>>>> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
>>>> ---
>>>> lib/eal/include/generic/rte_cpuflags.h | 2 ++
>>>> lib/eal/x86/include/rte_cpuflags.h | 1 +
>>>> lib/eal/x86/rte_cpuflags.c | 3 +++
>>>> 3 files changed, 6 insertions(+)
>>>>
>>>> diff --git a/lib/eal/include/generic/rte_cpuflags.h
>>>> b/lib/eal/include/generic/rte_cpuflags.h
>>>> index d35551e931..db653a8dd7 100644
>>>> --- a/lib/eal/include/generic/rte_cpuflags.h
>>>> +++ b/lib/eal/include/generic/rte_cpuflags.h
>>>> @@ -26,6 +26,8 @@ struct rte_cpu_intrinsics {
>>>> /**< indicates support for rte_power_pause function */
>>>> uint32_t power_monitor_multi : 1;
>>>> /**< indicates support for rte_power_monitor_multi function */
>>>> + uint32_t amd_power_monitorx : 1;
>>>> + /**< indicates amd support for rte_power_monitor function */
>>>
>>> I did not look at the patch detail, I just stopped at this part.
>>> What makes the AMD monitorx stuff special that it needs to be exposed in the
>>> generic API?
>>
>> Monitorx is different ISA /opcode (0F 01 FA) as compared to UMonitor (0F 01 C8). This need to be distinguished
>> on specific x86 platforms. Hence in the current power intrinsics, for x86 we require a new flag to
>> distinguish MonitorX and UMonitor and invoke the appropriate x86 ISA in the datapath.
>
> Requiring a new x86 cpuflag to identify this ISA presence is ok.
>
>
> But here, I am talking about the generic power instrinsic API.
> Let me phrase my comment differently...
>
> As described in the API:
> uint32_t power_monitor : 1;
> /**< indicates support for rte_power_monitor function */
>
> Does AMD thing behave completely different from the x86?
> Looking at patch 3, I understand this is not the case.
>
> So we don't need a "amd" flag in the generic flags.
> The indirection for calling the right ISA should be hidden in
> rte_power_* helpers implemented for x86.
>
>
The 'rte_cpu_get_intrinsics_support()' API and "struct
rte_cpu_intrinsics" struct seems intended to get power features in
generic way, agree to keep it generic.
But also there is a need to run architecture specific instructions, so
need to know the architecture within power library, for this what do you
think to check 'MONITORX' support again in 'rte_power_intrinsics_init()'
function?
And most of the 'amd_power_monitorx()' function is duplicate of the
'rte_power_monitor()' API, only difference is the asm calls, what do you
think to extract these calls to function pointers for AMD and Intel, so
that 'rte_power_monitor()' can become a x86 generic function?
As architecture will be known in the 'rte_power_intrinsics_init()', we
can set the function pointers properly for architecture in this init stage.
Only concern is possible performance impact of pointer dereference
instead of direct call, I hope @David Hunt can help us to test the
performance impact of it in Intel platforms if this approach is reasonable.
next prev parent reply other threads:[~2023-04-14 11:48 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 11:53 Sivaprasad Tummala
2023-04-13 11:53 ` [PATCH v2 2/3] doc: announce new cpu flag added to rte_cpu_flag_t Sivaprasad Tummala
2023-04-17 4:31 ` [PATCH v3 1/4] " Sivaprasad Tummala
2023-04-18 8:14 ` [PATCH v4 0/4] power: monitor support for AMD EPYC processors Sivaprasad Tummala
2023-04-18 8:25 ` Sivaprasad Tummala
2023-04-18 8:25 ` [PATCH v4 1/4] doc: announce new cpu flag added to rte_cpu_flag_t Sivaprasad Tummala
2023-04-18 8:52 ` Ferruh Yigit
2023-04-18 9:22 ` Bruce Richardson
2023-06-01 9:23 ` David Marchand
2023-07-05 11:32 ` Konstantin Ananyev
2023-08-16 18:59 ` [PATCH v5 1/3] eal: add x86 cpuid support for monitorx Sivaprasad Tummala
2023-08-16 18:59 ` [PATCH v5 2/3] eal: removed unnecessary checks in x86 power monitor APIs Sivaprasad Tummala
2023-08-16 18:59 ` [PATCH v5 3/3] power: amd power monitor support Sivaprasad Tummala
2023-08-16 19:27 ` Tyler Retzlaff
2023-08-17 11:34 ` Tummala, Sivaprasad
2023-08-17 14:18 ` Konstantin Ananyev
2023-08-18 13:25 ` Ferruh Yigit
2023-08-18 13:48 ` Bruce Richardson
2023-08-21 15:42 ` Tyler Retzlaff
2023-08-22 22:30 ` Konstantin Ananyev
2023-08-23 9:19 ` Ferruh Yigit
2023-08-23 16:03 ` Tyler Retzlaff
2023-08-24 9:04 ` Ferruh Yigit
2023-08-25 16:00 ` Tyler Retzlaff
2023-08-30 22:45 ` Konstantin Ananyev
2023-09-27 10:38 ` Tummala, Sivaprasad
2023-09-28 10:11 ` Konstantin Ananyev
2023-10-06 8:26 ` David Marchand
2023-10-09 8:02 ` Tummala, Sivaprasad
2023-10-09 14:05 ` [PATCH v6 1/3] eal: add x86 cpuid support for monitorx Sivaprasad Tummala
2023-10-09 14:05 ` [PATCH v6 2/3] eal: removed unnecessary checks in x86 power monitor APIs Sivaprasad Tummala
2023-10-09 14:05 ` [PATCH v6 3/3] power: amd power monitor support Sivaprasad Tummala
2023-10-10 8:59 ` David Marchand
2023-10-11 9:33 ` Tummala, Sivaprasad
2023-10-10 10:14 ` Konstantin Ananyev
2023-10-09 16:23 ` [PATCH v6 1/3] eal: add x86 cpuid support for monitorx Patrick Robb
2023-10-10 8:21 ` David Marchand
2023-04-18 8:25 ` [PATCH v4 2/4] " Sivaprasad Tummala
2023-06-14 13:15 ` Burakov, Anatoly
2023-04-18 8:25 ` [PATCH v4 3/4] eal: removed unnecessary checks in x86 power monitor APIs Sivaprasad Tummala
2023-06-14 13:14 ` Burakov, Anatoly
2023-04-18 8:25 ` [PATCH v4 4/4] power: amd power monitor support Sivaprasad Tummala
2023-06-14 13:14 ` Burakov, Anatoly
2023-04-13 11:53 ` [PATCH v2 3/3] " Sivaprasad Tummala
2023-04-17 4:34 ` [PATCH v3 4/4] " Sivaprasad Tummala
2023-04-13 11:59 ` [PATCH v2 1/3] eal: add x86 cpuid support for monitorx David Marchand
2023-04-13 17:50 ` Tummala, Sivaprasad
2023-04-14 7:05 ` David Marchand
2023-04-14 8:51 ` Tummala, Sivaprasad
2023-04-14 11:48 ` Ferruh Yigit [this message]
2023-04-17 4:32 ` [PATCH v3 2/4] " Sivaprasad Tummala
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=c586ab87-0297-0ed2-61b6-b819d961f758@amd.com \
--to=ferruh.yigit@amd.com \
--cc=Sivaprasad.Tummala@amd.com \
--cc=anatoly.burakov@intel.com \
--cc=david.hunt@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--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).