forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Oleg Nesterov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Showing
5 changed files
with
44 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* proc_io_accounting: a structure which is used for recording a single task's | ||
* task_io_accounting: a structure which is used for recording a single task's | ||
* IO statistics. | ||
* | ||
* Don't include this header file directly - it is designed to be dragged in via | ||
|
@@ -8,8 +8,8 @@ | |
* Blame [email protected] for all this. | ||
*/ | ||
|
||
struct task_io_accounting { | ||
#ifdef CONFIG_TASK_XACCT | ||
struct task_chr_io_accounting { | ||
/* bytes read */ | ||
u64 rchar; | ||
/* bytes written */ | ||
|
@@ -18,14 +18,9 @@ struct task_chr_io_accounting { | |
u64 syscr; | ||
/* # of write syscalls */ | ||
u64 syscw; | ||
}; | ||
#else /* CONFIG_TASK_XACCT */ | ||
struct task_chr_io_accounting { | ||
}; | ||
#endif /* CONFIG_TASK_XACCT */ | ||
|
||
#ifdef CONFIG_TASK_IO_ACCOUNTING | ||
struct task_io_accounting { | ||
/* | ||
* The number of bytes which this task has caused to be read from | ||
* storage. | ||
|
@@ -46,13 +41,5 @@ struct task_io_accounting { | |
* information loss in doing that. | ||
*/ | ||
u64 cancelled_write_bytes; | ||
}; | ||
#else /* CONFIG_TASK_IO_ACCOUNTING */ | ||
struct task_io_accounting { | ||
}; | ||
#endif /* CONFIG_TASK_IO_ACCOUNTING */ | ||
|
||
struct proc_io_accounting { | ||
struct task_chr_io_accounting chr; | ||
struct task_io_accounting blk; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters