-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 43962 b: refs/heads/master c: 7c3ab73 h: refs/heads/master v: v3
- Loading branch information
Andrew Morton
authored and
Linus Torvalds
committed
Dec 10, 2006
1 parent
d12d95a
commit d967891
Showing
6 changed files
with
98 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 47694bb86af3648d4ec34c7afd46653cefc9b359 | ||
refs/heads/master: 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2 |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* 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 | ||
* sched.h. | ||
* | ||
* Blame akpm@osdl.org for all this. | ||
*/ | ||
|
||
#ifdef CONFIG_TASK_IO_ACCOUNTING | ||
struct task_io_accounting { | ||
/* | ||
* The number of bytes which this task has caused to be read from | ||
* storage. | ||
*/ | ||
u64 read_bytes; | ||
|
||
/* | ||
* The number of bytes which this task has caused, or shall cause to be | ||
* written to disk. | ||
*/ | ||
u64 write_bytes; | ||
|
||
/* | ||
* A task can cause "negative" IO too. If this task truncates some | ||
* dirty pagecache, some IO which another task has been accounted for | ||
* (in its write_bytes) will not be happening. We _could_ just | ||
* subtract that from the truncating task's write_bytes, but there is | ||
* information loss in doing that. | ||
*/ | ||
u64 cancelled_write_bytes; | ||
}; | ||
#else | ||
struct task_io_accounting { | ||
}; | ||
#endif |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Task I/O accounting operations | ||
*/ | ||
#ifndef __TASK_IO_ACCOUNTING_OPS_INCLUDED | ||
#define __TASK_IO_ACCOUNTING_OPS_INCLUDED | ||
|
||
#ifdef CONFIG_TASK_IO_ACCOUNTING | ||
static inline void task_io_account_read(size_t bytes) | ||
{ | ||
current->ioac.read_bytes += bytes; | ||
} | ||
|
||
static inline void task_io_account_write(size_t bytes) | ||
{ | ||
current->ioac.write_bytes += bytes; | ||
} | ||
|
||
static inline void task_io_account_cancelled_write(size_t bytes) | ||
{ | ||
current->ioac.cancelled_write_bytes += bytes; | ||
} | ||
|
||
static inline void task_io_accounting_init(struct task_struct *tsk) | ||
{ | ||
memset(&tsk->ioac, 0, sizeof(tsk->ioac)); | ||
} | ||
|
||
#else | ||
|
||
static inline void task_io_account_read(size_t bytes) | ||
{ | ||
} | ||
|
||
static inline void task_io_account_write(size_t bytes) | ||
{ | ||
} | ||
|
||
static inline void task_io_account_cancelled_write(size_t bytes) | ||
{ | ||
} | ||
|
||
static inline void task_io_accounting_init(struct task_struct *tsk) | ||
{ | ||
} | ||
|
||
#endif /* CONFIG_TASK_IO_ACCOUNTING */ | ||
#endif /* __TASK_IO_ACCOUNTING_OPS_INCLUDED */ |
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