Oddbean new post about | logout
 @98025892 unless you have a daemon configuring 'nice' levels like ananicy or system76-scheduler, it doesn't. 
 @07e5c507 @sommerfeld 
That seems like an efficiency problem in the Linux kernel, or do I misunderstand how that actually works?

As I understand it, a program issues a `read` syscall and the kernel issues a command to the storage device. While it's waiting for a response, the execution is halted and it appears as IO_WAIT. So the kernel KNOWS it's waiting, so it should just have the CPU do other things instead. 

Or, in other words, the code that polls for a response of the block device should just check if there is anything to do and if not it should just tell the scheduler "Hey, I'm just wasting time here, let another thread run."

I know Windows can do that. Threads can sleep until a specific event occurs. Is Linux fundametally different here? 
 I have to confess that I don't know enough about the kernel to answer that. I can only speak about the symptoms, because I've also experienced them.