• Maxim Uvarov's avatar
    taskstats: add context-switch counters · b663a79c
    Maxim Uvarov authored
    Make available to the user the following task and process performance
    statistics:
    
    	* Involuntary Context Switches (task_struct->nivcsw)
    	* Voluntary Context Switches (task_struct->nvcsw)
    
    Statistics information is available from:
    	1. taskstats interface (Documentation/accounting/)
    	2. /proc/PID/status (task only).
    
    This data is useful for detecting hyperactivity patterns between processes.
    
    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: default avatarMaxim Uvarov <muvarov@ru.mvista.com>
    Cc: Shailabh Nagar <nagar@watson.ibm.com>
    Cc: Balbir Singh <balbir@in.ibm.com>
    Cc: Jay Lan <jlan@engr.sgi.com>
    Cc: Jonathan Lim <jlim@sgi.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b663a79c
taskstats.c 12.1 KB