Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: comp.arch Subject: Re: rep movsb vs. simpler instructions for memcpy/memmove Date: Fri, 14 Mar 2025 16:37:08 -0400 Organization: A noiseless patient Spider Lines: 13 Message-ID: References: <20250312140915.000010a8@yahoo.com> <2025Mar12.174636@mips.complang.tuwien.ac.at> <61cab9791f342672dcbd5dfd539cc5cc@www.novabbs.org> <3104c2ab707086659d698a0377450527@www.novabbs.org> <20250313225516.00004206@yahoo.com> <5jIAP.61128$Xq5f.38323@fx38.iad> <20250314001619.000004fa@yahoo.com> <2025Mar14.141837@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Fri, 14 Mar 2025 21:37:09 +0100 (CET) Injection-Info: dont-email.me; posting-host="039f5f6059b01691c21f036354f8b6f2"; logging-data="2138733"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+UYxInqrFYRaQzXevuvAat5tHvBqlyNy8=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:MDI9CiJDohbfSwwGVbmL36lEa20= sha1:iqYqA7O6GNHDCCku6PuFM/3UCTU= Bytes: 2057 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