> From: Stephen Hemminger [mailto:step...@networkplumber.org]
> Sent: Wednesday, 27 July 2022 21.12
[RFC v2] non-temporal memcpy
> 
> On Wed, 27 Jul 2022 20:49:59 +0200
> Morten Brørup <m...@smartsharesystems.com> wrote:
> 
> > I'm considering rte_memcpy_nt() a performance optimized variant of
> memcpy(), where the performance gain is less cache pollution. Thus,
> silent fallback to memcpy() should suffice.
> 
> 
> Have you looked at existing Glibc code? last time I checked it was
> already doing
> non-temporal instructions on several architectures.

Good idea!

I found the glibc implementation of memcpy() [1], and it only uses non-temporal 
store, not non-temporal load; and only for big lengths.

BTW, this also reveals that memcpy() sometimes behaves differently than 
rte_memcpy(), which never uses non-temporal store.

[1] 
https://elixir.bootlin.com/glibc/latest/source/sysdeps/x86_64/multiarch/memcpy-ssse3.S

Reply via email to