mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] per-task-delay-accounting: setup
Initialization code related to collection of per-task "delay" statistics which measure how long it had to wait for cpu, sync block io, swapping etc. The collection of statistics and the interface are in other patches. This patch sets up the data structures and allows the statistics collection to be disabled through a kernel boot parameter. Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Cc: Jes Sorensen <jes@sgi.com> Cc: Peter Chubb <peterc@gelato.unsw.edu.au> Cc: Erich Focht <efocht@ess.nec.de> Cc: Levent Serinol <lserinol@gmail.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
e8f4d97e1b
commit
ca74e92b46
10 changed files with 207 additions and 0 deletions
|
@ -552,6 +552,23 @@ struct sched_info {
|
|||
extern struct file_operations proc_schedstat_operations;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TASK_DELAY_ACCT
|
||||
struct task_delay_info {
|
||||
spinlock_t lock;
|
||||
unsigned int flags; /* Private per-task flags */
|
||||
|
||||
/* For each stat XXX, add following, aligned appropriately
|
||||
*
|
||||
* struct timespec XXX_start, XXX_end;
|
||||
* u64 XXX_delay;
|
||||
* u32 XXX_count;
|
||||
*
|
||||
* Atomicity of updates to XXX_delay, XXX_count protected by
|
||||
* single lock above (split into XXX_lock if contention is an issue).
|
||||
*/
|
||||
};
|
||||
#endif
|
||||
|
||||
enum idle_type
|
||||
{
|
||||
SCHED_IDLE,
|
||||
|
@ -945,6 +962,9 @@ struct task_struct {
|
|||
* cache last used pipe for splice
|
||||
*/
|
||||
struct pipe_inode_info *splice_pipe;
|
||||
#ifdef CONFIG_TASK_DELAY_ACCT
|
||||
struct task_delay_info *delays;
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline pid_t process_group(struct task_struct *tsk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue