mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[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 <[email protected]> Cc: Jay Lan <[email protected]> Cc: Balbir Singh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
18f705f49a
commit
4b98d11b40
4 changed files with 58 additions and 12 deletions
|
|
@ -1810,17 +1810,21 @@ static int proc_base_fill_cache(struct file *filp, void *dirent, filldir_t filld
|
|||
static int proc_pid_io_accounting(struct task_struct *task, char *buffer)
|
||||
{
|
||||
return sprintf(buffer,
|
||||
#ifdef CONFIG_TASK_XACCT
|
||||
"rchar: %llu\n"
|
||||
"wchar: %llu\n"
|
||||
"syscr: %llu\n"
|
||||
"syscw: %llu\n"
|
||||
#endif
|
||||
"read_bytes: %llu\n"
|
||||
"write_bytes: %llu\n"
|
||||
"cancelled_write_bytes: %llu\n",
|
||||
#ifdef CONFIG_TASK_XACCT
|
||||
(unsigned long long)task->rchar,
|
||||
(unsigned long long)task->wchar,
|
||||
(unsigned long long)task->syscr,
|
||||
(unsigned long long)task->syscw,
|
||||
#endif
|
||||
(unsigned long long)task->ioac.read_bytes,
|
||||
(unsigned long long)task->ioac.write_bytes,
|
||||
(unsigned long long)task->ioac.cancelled_write_bytes);
|
||||
|
|
|
|||
Loading…
Reference in a new issue