LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>
Subject: [PATCH -tip 2/2] sched: Display autogroup names in /proc/sched_debug.
Date: Tue, 11 Jan 2011 15:42:57 +0530	[thread overview]
Message-ID: <20110111101257.GF4772@in.ibm.com> (raw)
In-Reply-To: <20110111101040.GD4772@in.ibm.com>

sched: Display autogroup names in /proc/sched_debug.

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

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
 kernel/sched_autogroup.c |    5 +++++
 kernel/sched_debug.c     |    3 +++
 2 files changed, 8 insertions(+)

--- a/kernel/sched_autogroup.c
+++ b/kernel/sched_autogroup.c
@@ -231,6 +231,11 @@ void proc_sched_autogroup_show_task(stru
 #ifdef CONFIG_SCHED_DEBUG
 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);
 }
 #endif /* CONFIG_SCHED_DEBUG */
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -93,6 +93,9 @@ static char group_path[PATH_MAX];
 
 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
 	 */

  parent reply	other threads:[~2011-01-11 10:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 10:10 [PATCH -tip 0/2] sched: Get group names back in /proc/sched_debug - v1 Bharata B Rao
2011-01-11 10:11 ` [PATCH -tip 1/2] [PATCH -tip 1/2] sched: Reinstate group names in /proc/sched_debug Bharata B Rao
2011-01-11 12:46   ` Yong Zhang
2011-01-11 13:42     ` Bharata B Rao
2011-01-11 14:00       ` Yong Zhang
2011-01-12  7:49         ` Bharata B Rao
2011-01-12  9:17           ` Yong Zhang
2011-01-12 11:18           ` Peter Zijlstra
2011-01-12 23:16             ` Paul E. McKenney
2011-01-13  1:24               ` Yong Zhang
2011-01-18 19:04   ` [tip:sched/urgent] " tip-bot for Bharata B Rao
2011-01-11 10:12 ` Bharata B Rao [this message]
2011-01-18 19:05   ` [tip:sched/urgent] sched: Display autogroup " tip-bot for Bharata B Rao
2011-01-11 10:29 ` [PATCH -tip 0/2] sched: Get group names back in /proc/sched_debug - v1 Mike Galbraith
  -- strict thread matches above, loose matches on Subject: below --
2011-01-10  5:14 [PATCH -tip 0/2] sched: Get group names back in /proc/sched_debug Bharata B Rao
2011-01-10  5:16 ` [PATCH -tip 2/2] sched: Display autogroup names " Bharata B Rao
2011-01-10  9:38   ` Mike Galbraith
2011-01-10 10:09     ` Bharata B Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110111101257.GF4772@in.ibm.com \
    --to=bharata@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --subject='Re: [PATCH -tip 2/2] sched: Display autogroup names in /proc/sched_debug.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).