From: Balbir Singh On Mon, May 08, 2006 at 02:19:52PM -0700, Andrew Morton wrote: > Balbir Singh wrote: > > > > @@ -550,6 +550,12 @@ struct task_delay_info { > > * Atomicity of updates to XXX_delay, XXX_count protected by > > * single lock above (split into XXX_lock if contention is an issue). > > */ > > + > > + struct timespec blkio_start, blkio_end; /* Shared by blkio, swapin */ > > + u64 blkio_delay; /* wait for sync block io completion */ > > + u64 swapin_delay; /* wait for swapin block io completion */ > > + u32 blkio_count; > > + u32 swapin_count; > > These fields are a bit mystifying. > > In what units are blkio_delay and swapin_delay? > > What is the meaning behind blkio_count and swapin_count? > > Better comments needed, please. Hi, Andrew, Here is an update, that adds comments to the fields as suggested in the review comments Balbir Singh, Linux Technology Center, IBM Software Labs Changelog 1. Add comments to the task_delay_info structure, documenting the units of delay and document the meaning of the count fields in the structure. Signed-off-by: Balbir Singh Signed-off-by: Shailabh Nagar Cc: Jes Sorensen Cc: Peter Chubb Cc: Erich Focht Cc: Levent Serinol Cc: Jay Lan Signed-off-by: Andrew Morton --- include/linux/sched.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff -puN include/linux/sched.h~per-task-delay-accounting-sync-block-i-o-and-swapin-delay-collection-fix-1 include/linux/sched.h --- a/include/linux/sched.h~per-task-delay-accounting-sync-block-i-o-and-swapin-delay-collection-fix-1 +++ a/include/linux/sched.h @@ -568,11 +568,18 @@ struct task_delay_info { * single lock above (split into XXX_lock if contention is an issue). */ + /* + * XXX_count is incremented on every XXX operation, the delay + * associated with the operation is added to XXX_delay. + * XXX_delay contains the accumulated delay time in nanoseconds. + */ struct timespec blkio_start, blkio_end; /* Shared by blkio, swapin */ u64 blkio_delay; /* wait for sync block io completion */ u64 swapin_delay; /* wait for swapin block io completion */ - u32 blkio_count; - u32 swapin_count; + u32 blkio_count; /* total count of the number of sync block */ + /* io operations performed */ + u32 swapin_count; /* total count of the number of swapin block */ + /* io operations performed */ }; #endif _