mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] io-accounting: via taskstats
Deliver IO accounting via taskstats. Cc: Jay Lan <[email protected]> Cc: Shailabh Nagar <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Chris Sturtivant <[email protected]> Cc: Tony Ernst <[email protected]> Cc: Guillaume Thouvenin <[email protected]> Cc: David Wright <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f2f1f8a3b8
commit
4a7864ca63
2 changed files with 16 additions and 1 deletions
|
|
@ -96,6 +96,15 @@ void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
|
|||
stats->write_char = p->wchar;
|
||||
stats->read_syscalls = p->syscr;
|
||||
stats->write_syscalls = p->syscw;
|
||||
#ifdef CONFIG_TASK_IO_ACCOUNTING
|
||||
stats->read_bytes = p->ioac.read_bytes;
|
||||
stats->write_bytes = p->ioac.write_bytes;
|
||||
stats->cancelled_write_bytes = p->ioac.cancelled_write_bytes;
|
||||
#else
|
||||
stats->read_bytes = 0;
|
||||
stats->write_bytes = 0;
|
||||
stats->cancelled_write_bytes = 0;
|
||||
#endif
|
||||
}
|
||||
#undef KB
|
||||
#undef MB
|
||||
|
|
|
|||
Loading…
Reference in a new issue