[PATCH] per-task-delay-accounting: /proc export of aggregated block I/O delays
[GitHub/LineageOS/android_kernel_samsung_universal7580.git] / fs / proc / array.c
index 7495d3e207757ab29ef9ef2a3dd717187ec5c228..0b615d62a159b16eb8da4a593b52f4a469f46cc4 100644 (file)
@@ -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;