Hacker News new | past | comments | ask | show | jobs | submit login

Umm, no.

While the memory stalled information could be valuable in optimizing a program, it is correct to count it as part of the CPU busy.

Busy means the CPU was occupied with a task (other than the operating system's idle task), and thus not available for another task, regardless of how well or poorly it is making any sort of useful progress.

Just like you're busy at work even when you're wiping your monitor instead of coding.

Since "waiting for memory" isn't something handled by the scheduler (is not a scheduling wait), it just looks like any other non-scheduler-related busy.

A program can keep a CPU busy in multiple of ways such that there is no "utility" even in the absence of memory stalls. It might have a bug which causes it to loop infinitely. Or it could be a service application which is wrongly blowing through what should be a wait at the top of its loop.

In the days of multi-user systems at universities, administrations looked upon the running of game programs as a no-utility activity.




Yes, true by definition. But the article is trying to look past the definition to see what's really going on. Nobody says top says I'm 99% busy so that's as good as it gets


Plenty of people say that, unfortunately.


Memory stall means re-fetching an evicted or not-yet-faulted-in page from disk, so its disk I/O, which is done asynchronously and leaves the CPU available for another task.


I would say that the article is really talking about cache misses, not page faults.


This is not what it means. Maybe you're thinking of page faults, which happen for this reason among other reasons.


A page fault stall is visible to tools like top. A task waiting for a page to be faulted in so that it can continue is descheduled, and so 0% CPU. So I don't think that's what the article is talking about.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: