mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 16:30:53 -05:00
Enhanced REP MOVSB feature of CPUs starting from Ivy Bridge makes REP MOVSB the fastest way to copy memory in most of cases. However Intel Optimization Reference Manual says: "setting the DF to force REP MOVSB to copy bytes from high towards low addresses will expe- rience significant performance degradation". Measurements on Intel Cascade Lake and Alder Lake, same as on AMD Zen3 show that it can drop throughput to as low as 2.5-3.5GB/s, comparing to ~10-30GB/s of REP MOVSQ or hand-rolled loop, used for non-ERMS CPUs. This patch keeps ERMS use for forward ordered memory copies, but removes it for backward overlapped moves where it does not work. This is just a cosmetic sync with kernel, since libc does not use ERMS at this time. Reviewed by: mjg MFC after: 2 weeks |
||
|---|---|---|
| .. | ||
| bcmp.S | ||
| bcopy.c | ||
| bzero.c | ||
| Makefile.inc | ||
| memcmp.S | ||
| memcpy.S | ||
| memmove.S | ||
| memset.S | ||
| stpcpy.S | ||
| strcat.S | ||
| strcmp.S | ||
| strcpy.c | ||
| strlen.S | ||