On Thu, Oct 8, 2020 at 11:02 AM Bruce Richardson <bruce.richard...@intel.com> wrote: > > On Thu, Oct 08, 2020 at 09:09:52AM +0200, David Marchand wrote: > > On Thu, Oct 1, 2020 at 2:30 AM Omkar Maslekar <omkar.masle...@intel.com> > > wrote: > > > > > > rte_cldemote is similar to a prefetch hint - in reverse. cldemote(addr) > > > enables software to hint to hardware that line is likely to be shared. > > > Useful in core-to-core communications where cache-line is likely to be > > > shared. ARM and PPC implementation is provided with NOP and can be added > > > if any equivalent instructions could be used for implementation on those > > > architectures. > > > > > > Signed-off-by: Omkar Maslekar <omkar.masle...@intel.com> > > > Acked-by: Bruce Richardson <bruce.richard...@intel.com> > > > > I find this "rte_cldemote" name too close to the Intel instruction, > > but I can see no complaint from other arch maintainers, so I guess > > everyone is happy with it. > > It is very close, alright - though the name too does fairly well convey the > likely actual done by the instruction.. Is there a suggestion for a better, > more generic name.
I don't have a better suggestion. The prefetch API has some hints on the level of cache to put data in. For this new API, we have no indication, would it make sense? Is this available on all Intel CPUs supported with DPDK? No cpuflag check needed? > > > In any case, this is a new API, so it should be marked experimental. > > > Agreed. > > > As for unit tests, not sure there is much to do, maybe rename > > test_prefetch.c and call this new API too, wdyt? > > > I'm not sure how much value this would provide, but it can be done. As much as the existing test, checking we can call this API. If you think it is not worth it, we can drop the prefetch ut code. -- David Marchand