5 ms·
Swap has to get paged into real RAM when there is a page fault (presumably evicting something else). I'm guessing that this is actually mapping the NVM directl
by haberman 7y ago
Swap has to get paged into real RAM when there is a page fault (presumably evicting something else). I'm guessing that this is actually mapping the NVM directly into the process, so individual loads and stores write directly to the device instead of actual RAM.
- jolmg 7y agoThat seems like an implementation detail done for the performance of prioritizing the use of the faster device. If you need something that's in storage/swap, chances are you're going to need it repeatedly and so it's a performance boost to "swap" that with whatever is being used least in RAM. From a functional point of view, it's still really just expanding your memory with a persistent storage device. > I'm guessing that this is actually mapping the NVM directly into the process, so individual loads and stores write directly to the device instead of actual RAM. If this were the only difference, then it would be just swap without its main optimization and for no noticeable benefit. I doubt this is all there is to it.
- noselasd 7y agoTraditional swap is more complicated than that. The kernel can't map it directly as RAM, it has to be paged to and from the backing store and RAM - doing so is not just an optimization.