Description
In upstream kernel code, it is common to use io_schedule() (and related family of functions) to sleep when processes are waiting for IO completion, rather than schedule() when they are just idle or waiting to on other processes, memory, CPU, etc. This allows the kernel to account sleeping processes waiting for IO rather than waiting for the task to be runnable. That helps with vmstat, top and other commands that distinguish how processes are sleeping.
There are a number of places that Lustre waits for completion that should be updated:
- schedule() -> io_schedule() - with review to ensure it is actually waiting on IO
- schedule_timeout() -> io_schedule_timeout() - with review
- wait_event() -> io_wait_event() - with review
- l_wait_abortable*() - should be unrolled to use __wait_event() and calls io_schedule() at the bottom level, until such a time that [__]io_wait_event_interruptible*() is available in the kernel, possibly renamed to io_wait_event_abortable() to better match other functions