diff options
author | Arun R Bharadwaj <arun@linux.vnet.ibm.com> | 2008-12-01 10:19:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-01 14:39:50 -0500 |
commit | 6c415b9234a8c71f290e5d4fddc467f103f32719 (patch) | |
tree | d7ba28aab68b5b38952ccc6256b7ecb701b23ed5 /kernel/sched.c | |
parent | 70574a996fc7a70c5586eb56bd92a544eccf18b6 (diff) |
sched: add uid information to sched_debug for CONFIG_USER_SCHED
Impact: extend information in /proc/sched_debug
This patch adds uid information in sched_debug for CONFIG_USER_SCHED
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 6a99703e0eb0..4c7388ef5be7 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -261,6 +261,10 @@ struct task_group { | |||
261 | struct cgroup_subsys_state css; | 261 | struct cgroup_subsys_state css; |
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | #ifdef CONFIG_USER_SCHED | ||
265 | uid_t uid; | ||
266 | #endif | ||
267 | |||
264 | #ifdef CONFIG_FAIR_GROUP_SCHED | 268 | #ifdef CONFIG_FAIR_GROUP_SCHED |
265 | /* schedulable entities of this group on each cpu */ | 269 | /* schedulable entities of this group on each cpu */ |
266 | struct sched_entity **se; | 270 | struct sched_entity **se; |
@@ -286,6 +290,12 @@ struct task_group { | |||
286 | 290 | ||
287 | #ifdef CONFIG_USER_SCHED | 291 | #ifdef CONFIG_USER_SCHED |
288 | 292 | ||
293 | /* Helper function to pass uid information to create_sched_user() */ | ||
294 | void set_tg_uid(struct user_struct *user) | ||
295 | { | ||
296 | user->tg->uid = user->uid; | ||
297 | } | ||
298 | |||
289 | /* | 299 | /* |
290 | * Root task group. | 300 | * Root task group. |
291 | * Every UID task group (including init_task_group aka UID-0) will | 301 | * Every UID task group (including init_task_group aka UID-0) will |