On Mon, 2016-02-01 at 16:55 +0000, David Laight wrote: > From: Eric Dumazet > > Sent: 29 January 2016 22:29 > ... > > On modern intel cpus, this does not matter at all, sure. It took a while > > before "rep movsb" finally did the right thing. > > Unfortunately memcpy_to_io() etc now map to 'rep movsb', and that can > only be optimisied for cached addresses. > > So copies to/from pcie space get done as byte copies, slower than slow. > > The same is true when usespace has used mmap() to directly access > pcie memory. > > There isn't a standard wrapper than generates 'rep movsd'.
If memcpy_to_io() has problem because it assumed memcpy() had some properties, it is quite a different problem that should be referred to x86 maintainers ? arch/x86/lib/memcpy_64.S certainly contains a suitable variant.