aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2007-02-10 04:46:45 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:18:07 -0500
commit4b98d11b40f03382918796f3c5c936d5495d20a4 (patch)
tree616b7260196c9bd0eaf208ef8fab91fcf9efcece /kernel/fork.c
parent18f705f49a5b19206233f7cef8f869ce7291f8c8 (diff)
[PATCH] ifdef ->rchar, ->wchar, ->syscr, ->syscw from task_struct
They are fat: 4x8 bytes in task_struct. They are uncoditionally updated in every fork, read, write and sendfile. They are used only if you have some "extended acct fields feature". And please, please, please, read(2) knows about bytes, not characters, why it is called "rchar"? Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jay Lan <jlan@engr.sgi.com> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index d57118da73ff..80284eb488ce 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1038,10 +1038,12 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1038 p->utime = cputime_zero; 1038 p->utime = cputime_zero;
1039 p->stime = cputime_zero; 1039 p->stime = cputime_zero;
1040 p->sched_time = 0; 1040 p->sched_time = 0;
1041#ifdef CONFIG_TASK_XACCT
1041 p->rchar = 0; /* I/O counter: bytes read */ 1042 p->rchar = 0; /* I/O counter: bytes read */
1042 p->wchar = 0; /* I/O counter: bytes written */ 1043 p->wchar = 0; /* I/O counter: bytes written */
1043 p->syscr = 0; /* I/O counter: read syscalls */ 1044 p->syscr = 0; /* I/O counter: read syscalls */
1044 p->syscw = 0; /* I/O counter: write syscalls */ 1045 p->syscw = 0; /* I/O counter: write syscalls */
1046#endif
1045 task_io_accounting_init(p); 1047 task_io_accounting_init(p);
1046 acct_clear_integrals(p); 1048 acct_clear_integrals(p);
1047 1049