[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a1564e8d091648bcad9b5ec58ab6cc95@AcuMS.aculab.com>
Date: Fri, 3 Aug 2018 13:04:22 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Mikulas Patocka' <mpatocka@...hat.com>
CC: 'Ard Biesheuvel' <ard.biesheuvel@...aro.org>,
Ramana Radhakrishnan <ramana.gcc@...glemail.com>,
Florian Weimer <fweimer@...hat.com>,
"Thomas Petazzoni" <thomas.petazzoni@...e-electrons.com>,
GNU C Library <libc-alpha@...rceware.org>,
Andrew Pinski <pinskia@...il.com>,
"Catalin Marinas" <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
"Russell King" <linux@...linux.org.uk>,
LKML <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: RE: framebuffer corruption due to overlapping stp instructions on
arm64
From: Mikulas Patocka
> Sent: 03 August 2018 13:05
...
> > Even on x86 using memcpy() on PCIe memory (maybe mmap()ed into userspace)
> > isn't a good idea.
> > In the kernel memcpy_to/fromio() ought to be a better choice but that
> > is just an alternate name for memcpy().
> >
> > The problem on x86 is that memcpy() is likely to be implemented as
> > 'rep movsb' on modern cpu - relying on the cpu hardware to perform
> > cache-line sized transfers (etc).
> > Unfortunately on uncached locations it has to revert to byte copies.
> > So PCIe transfers (especially reads) are very slow.
> >
> > The transfers need to use the largest size register available.
> >
> > David
>
> On x86, the framebuffer is mapped as write-combining memory type, so "rep
> movsb" could merge the byte writes to larger chunks. I don't have a cpu
> with the ERMS feature - could anyone try it if rep movsb works worse or
> better than explicit writes to the framebuffer?
I don't think 'write combining' can help reads, and memcpy_to/fromio()
are likely to be used for normal memory mapped io areas.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists