Bug 1215186 - Consider applying this patch to Leap's kernel: bring back rep movsq for user access on CPUs without ERMS
Summary: Consider applying this patch to Leap's kernel: bring back rep movsq for user ...
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Leap 15.5
Hardware: x86-64 openSUSE Leap 15.5
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: openSUSE Kernel Bugs
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-10 19:41 UTC by Nikolai Nikolaevskii
Modified: 2023-09-11 09:11 UTC (History)
2 users (show)

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolai Nikolaevskii 2023-09-10 19:41:48 UTC
While Intel CPUs since Ivy Bridge support 'Enhanced REP MOVSB' command (ERMS), AMD CPUs prior to Zen 3 lack it.
Zen 3 info: https://en.wikipedia.org/wiki/Zen_3.
AMD Ryzen 5800X has ERMS, but AMD EPYC Milan 7R13 has not - what is going on there?!

Checking for availability of ERMS:
cat /proc/cpuinfo | grep erms

Patch: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca96b162bfd21a5d55e3cd6099e4ee357a0eeb68
, picked up by kernel 6.6, ILL backported to stable kernels (https://lkml.org/lkml/2023/9/8/926).

News:
https://www.phoronix.com/news/Linux-6.6-Optimize-Lacking-ERMS

Discussion:
https://stackoverflow.com/questions/27804852/assembly-rep-movs-mechanism
https://stackoverflow.com/questions/43343231/enhanced-rep-movsb-for-memcpy

Hint: usage of SSE2 instructions may bring better results.