From: Bruce Richardson <bruce.richardson@intel.com>
To: Wathsala Wathawana Vithanage <wathsala.vithanage@arm.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"david.marchand@redhat.com" <david.marchand@redhat.com>,
nd <nd@arm.com>
Subject: Re: [PATCH] eal/x86: cache queried CPU flags
Date: Mon, 7 Oct 2024 17:43:48 +0100 [thread overview]
Message-ID: <ZwQPxDDMBM8IXyRS@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <PAWPR08MB890939F05D415721FBAD0C369F7D2@PAWPR08MB8909.eurprd08.prod.outlook.com>
On Mon, Oct 07, 2024 at 04:29:31PM +0000, Wathsala Wathawana Vithanage wrote:
> > Rather than re-querying the HW each time a CPU flag is requested, we can just
> > save the return value in the flags array. This should speed up repeated
> > querying of CPU flags, and provides a workaround for a reported issue where
> > errors are seen with constant querying of the AVX-512 CPU flag from a non-
> > AVX VM.
> >
> > Bugzilla Id: 1501
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
>
> Hi Bruce,
> Why x86/rte_cpuflags.c is not using rte_getauxval() ?
I don't see any such DPDK function, unless I'm missing something? I do see
a linux function which includes hw capability flags. I suspect the reasons
we don't use that are:
1. Lack of awareness of it (at least on my end! :-))
2. Originally when we added flags for new instruction sets we may have
needed to support their detection on platforms where the kernel/libc was
too old to be aware of them.
3. It's linux only, so we'd still need these cpuid calls for other OS's
anyway.
Therefore, I don't see any benefit in using that function over what we do
now. Is there some benefit that you see that makes you think it would be
worthwhile switching?
Thanks,
/Bruce
next prev parent reply other threads:[~2024-10-07 16:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 11:06 Bruce Richardson
2024-10-07 11:23 ` David Marchand
2024-10-07 14:47 ` Wathsala Wathawana Vithanage
2024-10-07 16:29 ` Wathsala Wathawana Vithanage
2024-10-07 16:43 ` Bruce Richardson [this message]
2024-10-07 17:30 ` Wathsala Wathawana Vithanage
2024-10-11 12:42 ` Konstantin Ananyev
2024-10-11 12:48 ` Bruce Richardson
2024-10-11 13:00 ` Konstantin Ananyev
2024-10-11 13:31 ` Bruce Richardson
2024-10-11 13:33 ` [PATCH v2] " Bruce Richardson
2024-10-11 13:37 ` Konstantin Ananyev
2024-10-14 18:29 ` David Marchand
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=ZwQPxDDMBM8IXyRS@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=nd@arm.com \
--cc=wathsala.vithanage@arm.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;
as well as URLs for NNTP newsgroup(s).