mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
taskstats: add context-switch counters
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: Maxim 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a6c15c2b0f
commit
b663a79c19
5 changed files with 41 additions and 3 deletions
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#define TASKSTATS_VERSION 4
|
||||
#define TASKSTATS_VERSION 5
|
||||
#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
|
||||
* in linux/sched.h */
|
||||
|
||||
|
@ -149,6 +149,9 @@ struct taskstats {
|
|||
__u64 read_bytes; /* bytes of read I/O */
|
||||
__u64 write_bytes; /* bytes of write I/O */
|
||||
__u64 cancelled_write_bytes; /* bytes of cancelled write I/O */
|
||||
|
||||
__u64 nvcsw; /* voluntary_ctxt_switches */
|
||||
__u64 nivcsw; /* nonvoluntary_ctxt_switches */
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue