Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ecedd7a authored by Bharata B Rao's avatar Bharata B Rao Committed by Ingo Molnar
Browse files

sched: Display autogroup names in /proc/sched_debug



Add autogroup name to cfs_rq and tasks information to /proc/sched_debug.

Signed-off-by: default avatarBharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20110111101257.GF4772@in.ibm.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent efe25c2c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -231,6 +231,11 @@ void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m)
#ifdef CONFIG_SCHED_DEBUG
#ifdef CONFIG_SCHED_DEBUG
static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
{
{
	int enabled = ACCESS_ONCE(sysctl_sched_autogroup_enabled);

	if (!enabled || !tg->autogroup)
		return 0;

	return snprintf(buf, buflen, "%s-%ld", "/autogroup", tg->autogroup->id);
	return snprintf(buf, buflen, "%s-%ld", "/autogroup", tg->autogroup->id);
}
}
#endif /* CONFIG_SCHED_DEBUG */
#endif /* CONFIG_SCHED_DEBUG */
+3 −0
Original line number Original line Diff line number Diff line
@@ -93,6 +93,9 @@ static char group_path[PATH_MAX];


static char *task_group_path(struct task_group *tg)
static char *task_group_path(struct task_group *tg)
{
{
	if (autogroup_path(tg, group_path, PATH_MAX))
		return group_path;

	/*
	/*
	 * May be NULL if the underlying cgroup isn't fully-created yet
	 * May be NULL if the underlying cgroup isn't fully-created yet
	 */
	 */