aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorAndrea Righi <righi.andrea@gmail.com>2008-07-27 18:48:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-27 19:12:28 -0400
commit940389b8afad6495211614c13eb91ef7001773ec (patch)
tree92c581cc9dc7a067899a6a28e382e4099dfe8ead /include/linux/sched.h
parent837b41b5de356aa67abb2cadb5eef3efc7776f91 (diff)
task IO accounting: move all IO statistics in struct task_io_accounting
Simplify the code of include/linux/task_io_accounting.h. It is also more reasonable to have all the task i/o-related statistics in a single struct (task_io_accounting). Signed-off-by: Andrea Righi <righi.andrea@gmail.com> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 034c1ca6b332..5270d449ff9d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -505,7 +505,7 @@ struct signal_struct {
505 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; 505 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
506 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; 506 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
507 unsigned long inblock, oublock, cinblock, coublock; 507 unsigned long inblock, oublock, cinblock, coublock;
508 struct proc_io_accounting ioac; 508 struct task_io_accounting ioac;
509 509
510 /* 510 /*
511 * Cumulative ns of scheduled CPU time for dead threads in the 511 * Cumulative ns of scheduled CPU time for dead threads in the
@@ -1253,7 +1253,7 @@ struct task_struct {
1253 1253
1254 unsigned long ptrace_message; 1254 unsigned long ptrace_message;
1255 siginfo_t *last_siginfo; /* For ptrace use. */ 1255 siginfo_t *last_siginfo; /* For ptrace use. */
1256 struct proc_io_accounting ioac; 1256 struct task_io_accounting ioac;
1257#if defined(CONFIG_TASK_XACCT) 1257#if defined(CONFIG_TASK_XACCT)
1258 u64 acct_rss_mem1; /* accumulated rss usage */ 1258 u64 acct_rss_mem1; /* accumulated rss usage */
1259 u64 acct_vm_mem1; /* accumulated virtual memory usage */ 1259 u64 acct_vm_mem1; /* accumulated virtual memory usage */
@@ -2183,22 +2183,22 @@ extern long sched_group_rt_period(struct task_group *tg);
2183#ifdef CONFIG_TASK_XACCT 2183#ifdef CONFIG_TASK_XACCT
2184static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 2184static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
2185{ 2185{
2186 tsk->ioac.chr.rchar += amt; 2186 tsk->ioac.rchar += amt;
2187} 2187}
2188 2188
2189static inline void add_wchar(struct task_struct *tsk, ssize_t amt) 2189static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
2190{ 2190{
2191 tsk->ioac.chr.wchar += amt; 2191 tsk->ioac.wchar += amt;
2192} 2192}
2193 2193
2194static inline void inc_syscr(struct task_struct *tsk) 2194static inline void inc_syscr(struct task_struct *tsk)
2195{ 2195{
2196 tsk->ioac.chr.syscr++; 2196 tsk->ioac.syscr++;
2197} 2197}
2198 2198
2199static inline void inc_syscw(struct task_struct *tsk) 2199static inline void inc_syscw(struct task_struct *tsk)
2200{ 2200{
2201 tsk->ioac.chr.syscw++; 2201 tsk->ioac.syscw++;
2202} 2202}
2203#else 2203#else
2204static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 2204static inline void add_rchar(struct task_struct *tsk, ssize_t amt)