[PATCH] eal/x86: cache queried CPU flags

2024-10-11 Thread Bruce Richardson
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

RE: [PATCH] eal/x86: cache queried CPU flags

2024-10-11 Thread Konstantin Ananyev
> -Original Message- > From: Bruce Richardson > Sent: Friday, October 11, 2024 1:48 PM > To: Konstantin Ananyev > Cc: dev@dpdk.org; david.march...@redhat.com > Subject: Re: [PATCH] eal/x86: cache queried CPU flags > > On Fri, Oct 11, 2024 at 12:42:01PM +,

Re: [PATCH] eal/x86: cache queried CPU flags

2024-10-11 Thread Bruce Richardson
On Fri, Oct 11, 2024 at 12:42:01PM +, Konstantin Ananyev 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

RE: [PATCH] eal/x86: cache queried CPU flags

2024-10-11 Thread Konstantin Ananyev
> 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 > fl

RE: [PATCH] eal/x86: cache queried CPU flags

2024-10-07 Thread Wathsala Wathawana Vithanage
> > 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

Re: [PATCH] eal/x86: cache queried CPU flags

2024-10-07 Thread Bruce Richardson
On Mon, Oct 07, 2024 at 04:29:31PM +, 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

RE: [PATCH] eal/x86: cache queried CPU flags

2024-10-07 Thread Wathsala Wathawana Vithanage
> 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 fr

RE: [PATCH] eal/x86: cache queried CPU flags

2024-10-07 Thread Wathsala Wathawana Vithanage
> On Mon, Oct 7, 2024 at 1:07 PM Bruce Richardson > 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

Re: [PATCH] eal/x86: cache queried CPU flags

2024-10-07 Thread David Marchand
On Mon, Oct 7, 2024 at 1:07 PM Bruce Richardson 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

[PATCH] eal/x86: cache queried CPU flags

2024-10-07 Thread Bruce Richardson
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