diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-10-02 22:58:25 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-02 22:58:25 -0700 |
| commit | 7b88e5e0bdf25a3c7d7b6efd5caa54cbcdfec861 (patch) | |
| tree | ca8d59090a3e5c168a67ce3c4c20b44367a1267f /include | |
| parent | 7e96bae145f0f6bf287e5ba11679c114ed76f5d7 (diff) | |
[PATCH] "io wait" process accounting
Patch from Rik adds "I/O wait" statistics to /proc/stat.
This allows us to determine how much system time is being spent
awaiting IO completion. This is an important statistic, as it tends to
directly subtract from job completion time.
procps-2.0.9 is OK with this, but doesn't report it.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/blkdev.h | 4 | ||||
| -rw-r--r-- | include/linux/kernel_stat.h | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ee1171a3ae67..187213441ee7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -401,4 +401,8 @@ static inline void put_dev_sector(Sector p) page_cache_release(p.v); } +extern atomic_t nr_iowait_tasks; +void io_schedule(void); +void io_schedule_timeout(long timeout); + #endif diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 38ec5b8edc2e..a687f5b224e9 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -18,7 +18,9 @@ struct kernel_stat { unsigned int per_cpu_user[NR_CPUS], per_cpu_nice[NR_CPUS], - per_cpu_system[NR_CPUS]; + per_cpu_system[NR_CPUS], + per_cpu_idle[NR_CPUS], + per_cpu_iowait[NR_CPUS]; unsigned int dk_drive[DK_MAX_MAJOR][DK_MAX_DISK]; unsigned int dk_drive_rio[DK_MAX_MAJOR][DK_MAX_DISK]; unsigned int dk_drive_wio[DK_MAX_MAJOR][DK_MAX_DISK]; |
