From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Mike Galbraith <efault@gmx.de>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH -tip 2/2] sched: Display autogroup names in /proc/sched_debug.
Date: Mon, 10 Jan 2011 15:39:17 +0530 [thread overview]
Message-ID: <20110110100917.GH2772@in.ibm.com> (raw)
In-Reply-To: <1294652287.17357.14.camel@marge.simson.net>
On Mon, Jan 10, 2011 at 10:38:07AM +0100, Mike Galbraith wrote:
> On Mon, 2011-01-10 at 10:46 +0530, Bharata B Rao wrote:
> > 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_debug.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > --- a/kernel/sched_debug.c
> > +++ b/kernel/sched_debug.c
> > @@ -92,6 +92,14 @@ static void print_cfs_group_stats(struct
> > #ifdef CONFIG_CGROUP_SCHED
> > static char * task_group_path(struct task_group *tg)
> > {
> > +#ifdef CONFIG_SCHED_AUTOGROUP
> > + int enabled = ACCESS_ONCE(sysctl_sched_autogroup_enabled);
> > +
> > + if (enabled && tg->autogroup) {
> > + autogroup_path(tg, group_path, PATH_MAX);
> > + return group_path;
> > + }
> > +#endif
> > /*
> > * May be NULL if the underlying cgroup isn't fully-created yet
> > */
>
> What prevents the task being moved, and the task group being freed under
> you? Looks to me like task_group_path() needs rcu_read_lock(). It is
> locked in the other two instances. How about the below?
You are right, we need rcu_read_lock() there. Let me spin out an other
version with the changes.
Thanks,
Bharata.
next prev parent reply other threads:[~2011-01-10 10:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 5:14 [PATCH -tip 0/2] sched: Get group names back " Bharata B Rao
2011-01-10 5:15 ` [PATCH -tip 1/2] sched: Reinstate group names " Bharata B Rao
2011-01-11 1:53 ` Yong Zhang
2011-01-11 10:13 ` Bharata B Rao
2011-01-10 5:16 ` [PATCH -tip 2/2] sched: Display autogroup " Bharata B Rao
2011-01-10 9:38 ` Mike Galbraith
2011-01-10 10:09 ` Bharata B Rao [this message]
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:12 ` [PATCH -tip 2/2] sched: Display autogroup names in /proc/sched_debug 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=20110110100917.GH2772@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 \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®