Sujet : Re: rep movsb vs. simpler instructions for memcpy/memmove
De : monnier (at) *nospam* iro.umontreal.ca (Stefan Monnier)
Groupes : comp.archDate : 14. Mar 2025, 21:37:08
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <jwv4izvz742.fsf-monnier+comp.arch@gnu.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Gnus/5.13 (Gnus v5.13)
Anton Ertl [2025-03-14 13:18:37] wrote:
The usual case where "from" is memory-mapped I/O and "to" is
cache-coherent is when loading from an NVME SSD. AFAIK this is
usually done in larger block sizes, because of the overhead of setting
up the DMA, and is usually done in an asynchronous way.
Also, is the data transfer separate from the "disk" access? I'd expect
that the NVMe interface lets the CPU say "read block B and DMA it to
DRAM at address X" (after which we get an interrupt), so there is no
opportunity for a `rep movsb` or `MM` instruction to do part of the job.
Stefan