aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
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 /fs/proc
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 'fs/proc')
-rw-r--r--fs/proc/base.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 1a979ea3b379..7fb37d6f2864 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1810,17 +1810,21 @@ static int proc_base_fill_cache(struct file *filp, void *dirent, filldir_t filld
1810static int proc_pid_io_accounting(struct task_struct *task, char *buffer) 1810static int proc_pid_io_accounting(struct task_struct *task, char *buffer)
1811{ 1811{
1812 return sprintf(buffer, 1812 return sprintf(buffer,
1813#ifdef CONFIG_TASK_XACCT
1813 "rchar: %llu\n" 1814 "rchar: %llu\n"
1814 "wchar: %llu\n" 1815 "wchar: %llu\n"
1815 "syscr: %llu\n" 1816 "syscr: %llu\n"
1816 "syscw: %llu\n" 1817 "syscw: %llu\n"
1818#endif
1817 "read_bytes: %llu\n" 1819 "read_bytes: %llu\n"
1818 "write_bytes: %llu\n" 1820 "write_bytes: %llu\n"
1819 "cancelled_write_bytes: %llu\n", 1821 "cancelled_write_bytes: %llu\n",
1822#ifdef CONFIG_TASK_XACCT
1820 (unsigned long long)task->rchar, 1823 (unsigned long long)task->rchar,
1821 (unsigned long long)task->wchar, 1824 (unsigned long long)task->wchar,
1822 (unsigned long long)task->syscr, 1825 (unsigned long long)task->syscr,
1823 (unsigned long long)task->syscw, 1826 (unsigned long long)task->syscw,
1827#endif
1824 (unsigned long long)task->ioac.read_bytes, 1828 (unsigned long long)task->ioac.read_bytes,
1825 (unsigned long long)task->ioac.write_bytes, 1829 (unsigned long long)task->ioac.write_bytes,
1826 (unsigned long long)task->ioac.cancelled_write_bytes); 1830 (unsigned long long)task->ioac.cancelled_write_bytes);