diff options
author | Bharata B Rao <bharata@linux.vnet.ibm.com> | 2011-01-11 05:12:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-18 09:09:40 -0500 |
commit | 8ecedd7a06d27a31dbb36fab88e2ba6e6edd43ca (patch) | |
tree | f4fea491abd21408f8c607fb91baf709122a54de /kernel/sched_autogroup.c | |
parent | efe25c2c7b3a5d17b0c70987a758d8fe7af8e3d1 (diff) |
sched: Display autogroup names in /proc/sched_debug
Add autogroup name to cfs_rq and tasks information to /proc/sched_debug.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20110111101257.GF4772@in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_autogroup.c')
-rw-r--r-- | kernel/sched_autogroup.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/sched_autogroup.c b/kernel/sched_autogroup.c index 32a723b8f84c..938d52f80a2d 100644 --- a/kernel/sched_autogroup.c +++ b/kernel/sched_autogroup.c | |||
@@ -231,6 +231,11 @@ void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m) | |||
231 | #ifdef CONFIG_SCHED_DEBUG | 231 | #ifdef CONFIG_SCHED_DEBUG |
232 | static inline int autogroup_path(struct task_group *tg, char *buf, int buflen) | 232 | static inline int autogroup_path(struct task_group *tg, char *buf, int buflen) |
233 | { | 233 | { |
234 | int enabled = ACCESS_ONCE(sysctl_sched_autogroup_enabled); | ||
235 | |||
236 | if (!enabled || !tg->autogroup) | ||
237 | return 0; | ||
238 | |||
234 | return snprintf(buf, buflen, "%s-%ld", "/autogroup", tg->autogroup->id); | 239 | return snprintf(buf, buflen, "%s-%ld", "/autogroup", tg->autogroup->id); |
235 | } | 240 | } |
236 | #endif /* CONFIG_SCHED_DEBUG */ | 241 | #endif /* CONFIG_SCHED_DEBUG */ |