[dpdk-dev] [PATCH v2] config: enable packet data prefetch

Liu, Yong yong.liu at intel.com
Thu Oct 15 10:23:15 CEST 2020



> -----Original Message-----
> From: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>
> Sent: Thursday, October 15, 2020 12:10 PM
> To: Liu, Yong <yong.liu at intel.com>; thomas at monjalon.net
> Cc: Richardson, Bruce <bruce.richardson at intel.com>;
> stephen at networkplumber.org; dev at dpdk.org;
> david.marchand at redhat.com; Yigit, Ferruh <ferruh.yigit at intel.com>;
> maxime.coquelin at redhat.com; David Christensen
> <drc at linux.vnet.ibm.com>; Ruifeng Wang <Ruifeng.Wang at arm.com>; nd
> <nd at arm.com>; Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>;
> nd <nd at arm.com>
> Subject: RE: [dpdk-dev] [PATCH v2] config: enable packet data prefetch
> 
> <snip>
> 
> > >
> > > 23/09/2020 03:51, Marvin Liu:
> > > > 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 at intel.com>
> > > > ---
> > > > +#define RTE_PMD_PACKET_PREFETCH 1
> > >
> > > We could also remove the related #ifdefs.
> > >
> > > What can be the drawback of always enable those prefetches?
> > >
> >
> > Hi Thomas,
> > I think the potential drawback is that current prefetch location cannot
> > guarantee the best performance across different platforms.
> Then, does it make sense to enable this by default?
> 

Now most of prefetch actions are placed after pointer of data is valid.  I think this methodology can benefit all platforms.
It's hard to say that it’s the best choice for all. But no more better solution in my mind. 
At least, we need to allow user to enable packet data prefetch. 

Regards,
Marvin

> > Each developer has tuned the performance by adding prefetch instruction
> > and verified the result on himself platform.
> > So prefetch location is based on certain platform, also it will be hard for
> > developer to compare the results across platforms.
> >
> > Thanks,
> > Marvin


More information about the dev mailing list