mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] per-task-delay-accounting: /proc export of aggregated block I/O delays
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) [[email protected]: printk warning fix] Signed-off-by: Shailabh Nagar <[email protected]> Signed-off-by: Balbir Singh <[email protected]> Cc: Jes Sorensen <[email protected]> Cc: Peter Chubb <[email protected]> Cc: Erich Focht <[email protected]> Cc: Levent Serinol <[email protected]> Cc: Jay Lan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a3baf649ca
commit
2589045466
3 changed files with 26 additions and 2 deletions
|
|
@ -74,6 +74,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>
|
||||
|
|
@ -411,7 +412,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
|
|||
|
||||
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,
|
||||
|
|
@ -455,7 +456,8 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
|
|||
task->exit_signal,
|
||||
task_cpu(task),
|
||||
task->rt_priority,
|
||||
task->policy);
|
||||
task->policy,
|
||||
(unsigned long long)delayacct_blkio_ticks(task));
|
||||
if(mm)
|
||||
mmput(mm);
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Reference in a new issue