3 ms·
Ok this has been bugging me for a while. How does speculative execution roll back side effect like write to disk or send a packet on the network, when the specu
by zaphirplane 7y ago
Ok this has been bugging me for a while. How does speculative execution roll back side effect like write to disk or send a packet on the network, when the speculation is wrong. At a guess there are safe instructions that can be run when doing branch prediction?
- jfnixon 7y agoI/O takes seven eternities in microcode-ville. It doesn't hurt too much to wait for the speculation to be resolved before changing state visible outside the microarchitecture of the CPU.
- wolf550e 7y agoNothing like that happens. Writes to dram or pcie devices or data bus cannot be rolled back. You have a misunderstanding of what speculative execution entails. The things that get rolled back are writes to general purpose registers.
- cwzwarich 7y agoAccesses to memory that is configured for device I/O (UnCacheable in x86 terms) are never speculated, so there’s nothing to roll back.