How much memory does a desktop Linux system waste?
omattos.com
omattos.com
That's a question of trading space for time. Sure, we could look at each page of cache RAM and work out the best way to use all of it very efficiently in terms of space, but what is the rest of your system doing while you're doing all that? Just wasting time, twiddling its thumbs, asking "Are we there yet?"
Ideas welcome for ways to convert this data into better ways of doing things!
Besides, if one is making a copy of a big (ie. greater than a page) piece of data to make modifications, one probably should have used some kind of data structure that deduplicated the parts of the data which weren't modified - that saves the unmodified parts of the data needing to even be read/written by the CPU.
Typically it's only things like qemu that set it.