diff options
author | Shailabh Nagar <nagar@watson.ibm.com> | 2006-07-14 03:24:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-15 00:53:57 -0400 |
commit | f9fd8914c1acca0d98b69d831b128d5b52f03c51 (patch) | |
tree | 18c2506bb31e49a9e2c4a483d37b0394c815fe9d /include/linux/taskstats.h | |
parent | c8924363da07aec213e5d359f23eeae1fff91951 (diff) |
[PATCH] per-task delay accounting taskstats interface: control exit data through cpumasks
On systems with a large number of cpus, with even a modest rate of tasks
exiting per cpu, the volume of taskstats data sent on thread exit can
overflow a userspace listener's buffers.
One approach to avoiding overflow is to allow listeners to get data for a
limited and specific set of cpus. By scaling the number of listeners
and/or the cpus they monitor, userspace can handle the statistical data
overload more gracefully.
In this patch, each listener registers to listen to a specific set of cpus
by specifying a cpumask. The interest is recorded per-cpu. When a task
exits on a cpu, its taskstats data is unicast to each listener interested
in that cpu.
Thanks to Andrew Morton for pointing out the various scalability and
general concerns of previous attempts and for suggesting this design.
[akpm@osdl.org: build fix]
Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com>
Signed-off-by: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/taskstats.h')
-rw-r--r-- | include/linux/taskstats.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index c6aeca32348e..f1cb6cddd19d 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
@@ -91,8 +91,6 @@ struct taskstats { | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | 93 | ||
94 | #define TASKSTATS_LISTEN_GROUP 0x1 | ||
95 | |||
96 | /* | 94 | /* |
97 | * Commands sent from userspace | 95 | * Commands sent from userspace |
98 | * Not versioned. New commands should only be inserted at the enum's end | 96 | * Not versioned. New commands should only be inserted at the enum's end |
@@ -124,6 +122,8 @@ enum { | |||
124 | TASKSTATS_CMD_ATTR_UNSPEC = 0, | 122 | TASKSTATS_CMD_ATTR_UNSPEC = 0, |
125 | TASKSTATS_CMD_ATTR_PID, | 123 | TASKSTATS_CMD_ATTR_PID, |
126 | TASKSTATS_CMD_ATTR_TGID, | 124 | TASKSTATS_CMD_ATTR_TGID, |
125 | TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, | ||
126 | TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, | ||
127 | __TASKSTATS_CMD_ATTR_MAX, | 127 | __TASKSTATS_CMD_ATTR_MAX, |
128 | }; | 128 | }; |
129 | 129 | ||