mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
c8924363da
commit
f9fd8914c1
4 changed files with 198 additions and 38 deletions
|
@ -91,8 +91,6 @@ struct taskstats {
|
|||
};
|
||||
|
||||
|
||||
#define TASKSTATS_LISTEN_GROUP 0x1
|
||||
|
||||
/*
|
||||
* Commands sent from userspace
|
||||
* Not versioned. New commands should only be inserted at the enum's end
|
||||
|
@ -124,6 +122,8 @@ enum {
|
|||
TASKSTATS_CMD_ATTR_UNSPEC = 0,
|
||||
TASKSTATS_CMD_ATTR_PID,
|
||||
TASKSTATS_CMD_ATTR_TGID,
|
||||
TASKSTATS_CMD_ATTR_REGISTER_CPUMASK,
|
||||
TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK,
|
||||
__TASKSTATS_CMD_ATTR_MAX,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue