summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2023-08-30 16:03:15 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2023-08-30 09:45:12 -0700
commitca96b162bfd21a5d55e3cd6099e4ee357a0eeb68 (patch)
tree9ee395c6e2370c5b6a11bb4877b272760f654c3b /tools
parent872459663c52f5e8a28c0cb6df08b77d6c24ab46 (diff)
x86: bring back rep movsq for user access on CPUs without ERMS
Intel CPUs ship with ERMS for over a decade, but this is not true for AMD. In particular one reasonably recent uarch (EPYC 7R13) does not have it (or at least the bit is inactive when running on the Amazon EC2 cloud -- I found rather conflicting information about AMD CPUs vs the extension). Hand-rolled mov loops executing in this case are quite pessimal compared to rep movsq for bigger sizes. While the upper limit depends on uarch, everyone is well south of 1KB AFAICS and sizes bigger than that are common. While technically ancient CPUs may be suffering from rep usage, gcc has been emitting it for years all over kernel code, so I don't think this is a legitimate concern. Sample result from read1_processes from will-it-scale (4KB reads/s): before: 1507021 after: 1721828 (+14%) Note that the cutoff point for rep usage is set to 64 bytes, which is way too conservative but I'm sticking to what was done in 47ee3f1dd93b ("x86: re-introduce support for ERMS copies for user space accesses"). That is to say *some* copies will now go slower, which is fixable but beyond the scope of this patch. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions