Remove PG_ZERO and zeroidle (page-zeroing) entirely
When a program needs memory, the operating system maps a physical page of memory (4KB in most cases) into its virtual memory space.<p>That page might have been in use by a different program only moments before, so the new program could go poking around in it to find interesting stuff. Like SSH keys or passwords or whatever. So the operating system has a responsibility to tidy up pre-loved pages before giving them out.<p>Once upon a time, filling 4KB with zeroes was a costly operation. It took a bunch of CPU cycles, and worse, would have trashed memory caches closer to the CPU.<p>So operating systems tend to have queues of discarded pages, background threads to zero them (when nothing more important is happening), and queues of zeroed pages to hand out when a program wants more memory.<p>This change is DragonFly BSD saying, &quot;Fuck it, we&#x27;ll do it live&quot;. It turns out that with the speed of modern CPUs and the way memory caches work today, they reckon it&#x27;s faster to just zero the memory synchronously, when the program requests it. No more queues, no more background work, no more weird cache behaviour.