diff mbox series

build: enable packet data prefetch

Message ID 20200922082135.62240-1-yong.liu@intel.com (mailing list archive)
State Superseded, archived
Headers show
Series build: enable packet data prefetch | expand

Checks

Context Check Description
ci/iol-broadcom-Functional success Functional Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Marvin Liu Sept. 22, 2020, 8:21 a.m. UTC
Data prefetch instruction can preload data into cpu’s hierarchical
cache before data access. Virtualized data paths like virtio utilized
this feature for acceleration. Since most modern cpus have support
prefetch function, we can enable packet data prefetch as default.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

Comments

Stephen Hemminger Sept. 22, 2020, 2:11 p.m. UTC | #1
On Tue, 22 Sep 2020 16:21:35 +0800
Marvin Liu <yong.liu@intel.com> wrote:

> Data prefetch instruction can preload data into cpu’s hierarchical
> cache before data access. Virtualized data paths like virtio utilized
> this feature for acceleration. Since most modern cpus have support
> prefetch function, we can enable packet data prefetch as default.
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> 
> diff --git a/config/meson.build b/config/meson.build
> index 69f2aeb605..a0c828a437 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -109,6 +109,9 @@ if not is_windows
>  	add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
>  endif
>  
> +# do prefetch of packet data
> +dpdk_conf.set('RTE_PMD_PACKET_PREFETCH', 1)
> +
>  # use pthreads if available for the platform
>  if not is_windows
>  	add_project_link_arguments('-pthread', language: 'c')

With meson, the project has been using rte_config.h for this.
Marvin Liu Sept. 23, 2020, 2 a.m. UTC | #2
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Tuesday, September 22, 2020 10:12 PM
> To: Liu, Yong <yong.liu@intel.com>
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] build: enable packet data prefetch
> 
> On Tue, 22 Sep 2020 16:21:35 +0800
> Marvin Liu <yong.liu@intel.com> wrote:
> 
> > Data prefetch instruction can preload data into cpu’s hierarchical
> > cache before data access. Virtualized data paths like virtio utilized
> > this feature for acceleration. Since most modern cpus have support
> > prefetch function, we can enable packet data prefetch as default.
> >
> > Signed-off-by: Marvin Liu <yong.liu@intel.com>
> >
> 
> With meson, the project has been using rte_config.h for this.

Thanks a lot,  will send v2 for the change. 

Regards,
Marvin
diff mbox series

Patch

diff --git a/config/meson.build b/config/meson.build
index 69f2aeb605..a0c828a437 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -109,6 +109,9 @@  if not is_windows
 	add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
 endif
 
+# do prefetch of packet data
+dpdk_conf.set('RTE_PMD_PACKET_PREFETCH', 1)
+
 # use pthreads if available for the platform
 if not is_windows
 	add_project_link_arguments('-pthread', language: 'c')