Hacker News new | ask | show | jobs
by DmitryOlshansky 2337 days ago
Adding an ability to zero-out arbitrary range directly to dram chip is very simple addition HW-wise.

In fact all ones is not hard either, there were some experiments to give RAM ability to perform simple page-level computations with promising results.

2 comments

Thing is, you still need to zero out any cache line that might be caching those lines, which would conflict with the CPU accessing the cache. Might as well just let the cpu doing the zeroing.
Invalidating cache lines is not that hard, it happens all the time. Refilling them from DRAM takes time.
Do you have a link where I can read more?

I also wonder, for typical workloads, what percent of CPU time is spent zeroing pages.

https://parallel.princeton.edu/papers/micro19-gao.pdf

The amount of time wasted zeroing out memory pages in a typical OS is quite significant, also take into account that such an operation will trash perfectly good cache space for no good reason.