Arm AArch64 Adds Memcpy() and Memset() Instructions
community.arm.com/developer/ip-products/proce...Posted Sep 21, 2021, 8:36 PM UTC
Posted Sep 21, 2021, 8:36 PM UTC
forget ram to ram, I want instructions for DMA to/from solid state storage
DMA by its nature is never going to be implemented as instructions as it runs in parallel with the processor core(s). i.e. asynchronous I/O Last thing you want is to serialize instructions with a block I/O transfer that can take a lot of cycles.
It should be implemented by the storage controller(s) in a system. How the heck the processor know where and what controller you choose to use? i.e. is it a RAID, SCSI, SATA etc At the driver level, it is a matter of writing to some I/O registers and use interrupt handler. It is not worth implementing it as an instruction.
It is not worth implementing it as an instruction.
That the main reason why RISC existed .
Writing to solid state storage is already mostly hands off for the CPU. For NVMe, the system basically tells the drive “go fetch the data from this address and store it”. The drive then tells the system when it’s done.
...yet more proof that shedding the RISC design mentality actually makes a lot of sense.
There are some useful parts to keep, like the fixed instruction size, the large resister count and the Load-Store architecture.
But it was wise to dump the actual "Reduced Instructions" part, along with anything that exposes the internal pipeline too much.
Debatable. There's code density arguments for variable length instructions. Modern ARM chips do macro-op fusion, which kinda turns a fixed length instruction set into a variable length one (as far as the processor is concerned).
I think we can all agree that x86's implementation is pretty bad, but I don't think a variable length instruction scheme is necessarily a bad idea.
I think everyone's settled on the idea that ~32 registers is ideal, so sounds good to me. There is the counter argument that it can impact available resources for OoO.
Well, these new memcpy/memset instructions break that idea (along with atomics and other fancy stuff).
If you're just considering standard instructions, I actually don't think x86's load-op instructions is necessarily a bad idea - uop fusion is handy and there is a minor benefit from not having to write the result of a load to a register. Now as for whether it's worth the complexity, I don't know.
I mostly mention it because we keep seeing people thinking design principles from the 1990s still makes sense today. There's good ideas from both RISC and CISC, and processors today often use those and generally don't fit strictly into either category.
[deleted]