Comment

Comment by IcePic

I have no idea on how many other OSes do this, but at least OpenBSD will use idle time to pre-clear memory pages that have been returned to the OS, so that when the next process has them mapped, it doesn't have to zero-fill-on-demand at the very latest moment. It has to be done at some point, but if you keep a queue of pages needing to be cleared and dealing with as many as you can while any core is idle, a non-100% busy system can be seen as to "improve" performance a bit by timeshifting the task to not-directly-after-former process but also not when the new process is calling for memory to be mapped in.

But when that list is empty, doing the right kind of CPU sleep is totally worthwhile of course.

parent IcePic 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton