Re: [PATCH] iowait stats for 2.5.33

Andrew Morton
2002-09-06T16:45:11Z

Rik van Riel wrote:
>
> Hi,
>
> the following patch, against 2.5.33-mm4, implements iowait
> statistics in /proc/stat.

trivial: I'd be inclined to use:

void iowait_schedule()
{
atomic_inc(...);
schedule();
atomic_dec(...);
}

less trivial: there are times when an io wait is deliberate:
in the context of balance_dirty_pages(), and (newly) in the
context of page reclaim when current->backing_dev_info is
non-zero.

Given that this is a deliberate throttling sleep, perhaps it
should not be included in the accounting? That way we only
account for the accidental, undesirable sleeps, and reads
and such.