On 4/21/20 3:39 PM, Will Deacon wrote: > On Tue, Apr 21, 2020 at 02:48:04PM +0200, Vlastimil Babka wrote: >> On 4/21/20 2:47 PM, Vlastimil Babka wrote: >> > >> > It was suspected that current Intel can prefetch forward and backwards, and the >> > tested ARM64 microarchitecture only backwards, can it be true? The current code >> >> Oops, tested ARM64 microarchitecture I meant "only forwards". > > I'd be surprised if that's the case, but it could be that there's an erratum > workaround in play which hampers the prefetch behaviour. We generally try > not to assume too much about the prefetcher on arm64 because they're not > well documented and vary wildly between different micro-architectures. Yeah it's probably not as simple as I thought, as the test code [1] shows the page iteration goes backwards, but per-page memsets are not special. So maybe it's not hardware specifics, but x86 memtest implementation is also done backwards, so it fits the backwards outer loop, but arm64 memset is forward, so the resulting pattern is non-linear? In that case it's also a question if the measurement was done in kernel or userspace, and if userspace memset have any implications for kernel memset... [1] https://lore.kernel.org/linux-mm/20200414153829.GA15230@xxxxxxxxxxx/ > Will >