The patch titled per-task-delay-accounting: /proc export of aggregated block I/O delays has been added to the -mm tree. Its filename is per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Balbir Singh <balbir@xxxxxxxxxx> Export I/O delays seen by a task through /proc/<tgid>/stats for use in top etc. Note that delays for I/O done for swapping in pages (swapin I/O) is clubbed together with all other I/O here (this is not the case in the netlink interface where the swapin I/O is kept distinct) Signed-off-by: Shailabh Nagar <nagar@xxxxxxxxxxxxxx> Signed-off-by: Balbir Singh <balbir@xxxxxxxxxx> Cc: Jes Sorensen <jes@xxxxxxx> Cc: Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx> Cc: Erich Focht <efocht@xxxxxxxxxx> Cc: Levent Serinol <lserinol@xxxxxxxxx> Cc: Jay Lan <jlan@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/proc/array.c | 6 ++++-- include/linux/delayacct.h | 10 ++++++++++ kernel/delayacct.c | 12 ++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff -puN fs/proc/array.c~per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays fs/proc/array.c --- 25/fs/proc/array.c~per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays Mon May 8 14:36:04 2006 +++ 25-akpm/fs/proc/array.c Mon May 8 14:36:04 2006 @@ -75,6 +75,7 @@ #include <linux/times.h> #include <linux/cpuset.h> #include <linux/rcupdate.h> +#include <linux/delayacct.h> #include <asm/uaccess.h> #include <asm/pgtable.h> @@ -412,7 +413,7 @@ static int do_task_stat(struct task_stru res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \ %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \ -%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n", +%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu %llu\n", task->pid, tcomm, state, @@ -456,7 +457,8 @@ static int do_task_stat(struct task_stru task->exit_signal, task_cpu(task), task->rt_priority, - task->policy); + task->policy, + delayacct_blkio_ticks(task)); if(mm) mmput(mm); return res; diff -puN include/linux/delayacct.h~per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays include/linux/delayacct.h --- 25/include/linux/delayacct.h~per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays Mon May 8 14:36:04 2006 +++ 25-akpm/include/linux/delayacct.h Mon May 8 14:36:04 2006 @@ -37,6 +37,7 @@ extern void __delayacct_tsk_exit(struct extern void __delayacct_blkio_start(void); extern void __delayacct_blkio_end(void); extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); +extern __u64 __delayacct_blkio_ticks(struct task_struct *); static inline void delayacct_set_flag(int flag) { @@ -84,6 +85,13 @@ static inline int delayacct_add_tsk(stru return __delayacct_add_tsk(d, tsk); } +static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk) +{ + if (tsk->delays) + return __delayacct_blkio_ticks(tsk); + return 0; +} + #else static inline void delayacct_set_flag(int flag) {} @@ -102,6 +110,8 @@ static inline void delayacct_blkio_end(v static inline int delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) { return 0; } +static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk) +{ return 0; } #endif /* CONFIG_TASK_DELAY_ACCT */ #endif diff -puN kernel/delayacct.c~per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays kernel/delayacct.c --- 25/kernel/delayacct.c~per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays Mon May 8 14:36:04 2006 +++ 25-akpm/kernel/delayacct.c Mon May 8 14:36:04 2006 @@ -146,3 +146,15 @@ int __delayacct_add_tsk(struct taskstats return 0; } + +__u64 __delayacct_blkio_ticks(struct task_struct *tsk) +{ + __u64 ret; + + spin_lock(&tsk->delays->lock); + ret = nsec_to_clock_t(tsk->delays->blkio_delay + + tsk->delays->swapin_delay); + spin_unlock(&tsk->delays->lock); + return ret; +} + _ Patches currently in -mm which might be from balbir@xxxxxxxxxx are fix-dcache-race-during-umount.patch fix-dcache-race-during-umount-fix.patch prune_one_dentry-tweaks.patch per-task-delay-accounting-setup.patch per-task-delay-accounting-sync-block-i-o-and-swapin-delay-collection.patch per-task-delay-accounting-cpu-delay-collection-via-schedstats.patch per-task-delay-accounting-utilities-for-genetlink-usage.patch per-task-delay-accounting-taskstats-interface.patch per-task-delay-accounting-delay-accounting-usage-of-taskstats-interface.patch per-task-delay-accounting-documentation.patch per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html