3 ms·
This would be a CPU command that works with the RAM controller rather than something you control yourself (kernels to my knowledge don’t talk directly to the co
by vlovich123 5y ago
This would be a CPU command that works with the RAM controller rather than something you control yourself (kernels to my knowledge don’t talk directly to the controller beyond maybe some basic power management, if that).
There is a definite need to do hundreds of MB - the Linux kernel has a background thread that does nothing but zero out pages. What do you think happens to the GBs of RAM freed by closing Chrome? Once it’s made available in one spot, no reason others could use it (eg a hardened malloc implementation, etc).
- gpderetta 5y agoInteresting that you mention linux, because Linus has very very strong opinions about this :)
- xvmt 5y agoWhat is his opinion about this?
- gpderetta 5y agoHe strongly believes that something like rep stos/rep mov is the right interface for memset/memcpy and off-core accelerators (like DMA) are misguided.
- Something1234 5y agoHis reasoning or rant for this?
- monocasa 5y agoI'm not sure about Linus's objections, but I've found that DMA accelerators for time sharing systems with general workloads haven't reaped benefits, as the overhead of multiplexing and synchronizing with them kills most of their benefits. At that point it's easier to blit memory yourself.
- kwertyoowiyop 5y agoWhat are they?
- monocasa 5y agoIf you find yourself doing this a lot, there's write combining memory to coalesce writes to be more friendly to the RAM controller. Additionally, CLZERO ends up doing very similar work since the resulting cache flush os seen by the RAM controller as a block write.