aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorShailabh Nagar <nagar@watson.ibm.com>2006-07-14 03:24:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-15 00:53:56 -0400
commitca74e92b4698276b6696f15a801759f50944f387 (patch)
tree26f0de66d8207608e07ee22389bfc173e773c0c2 /include/linux/sched.h
parente8f4d97e1b58b50ad6449bb2d35e6632c0236abd (diff)
[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>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1c876e27ff93..7a54e62763c5 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -552,6 +552,23 @@ struct sched_info {
552extern struct file_operations proc_schedstat_operations; 552extern struct file_operations proc_schedstat_operations;
553#endif 553#endif
554 554
555#ifdef CONFIG_TASK_DELAY_ACCT
556struct task_delay_info {
557 spinlock_t lock;
558 unsigned int flags; /* Private per-task flags */
559
560 /* For each stat XXX, add following, aligned appropriately
561 *
562 * struct timespec XXX_start, XXX_end;
563 * u64 XXX_delay;
564 * u32 XXX_count;
565 *
566 * Atomicity of updates to XXX_delay, XXX_count protected by
567 * single lock above (split into XXX_lock if contention is an issue).
568 */
569};
570#endif
571
555enum idle_type 572enum idle_type
556{ 573{
557 SCHED_IDLE, 574 SCHED_IDLE,
@@ -945,6 +962,9 @@ struct task_struct {
945 * cache last used pipe for splice 962 * cache last used pipe for splice
946 */ 963 */
947 struct pipe_inode_info *splice_pipe; 964 struct pipe_inode_info *splice_pipe;
965#ifdef CONFIG_TASK_DELAY_ACCT
966 struct task_delay_info *delays;
967#endif
948}; 968};
949 969
950static inline pid_t process_group(struct task_struct *tsk) 970static inline pid_t process_group(struct task_struct *tsk)