LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Yong Zhang <yong.zhang0@gmail.com>
Cc: linux-kernel@vger.kernel.org, Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH -tip 1/2] [PATCH -tip 1/2] sched: Reinstate group names in /proc/sched_debug.
Date: Tue, 11 Jan 2011 19:12:44 +0530	[thread overview]
Message-ID: <20110111134244.GJ4772@in.ibm.com> (raw)
In-Reply-To: <20110111124658.GA4507@zhy>

On Tue, Jan 11, 2011 at 08:46:58PM +0800, Yong Zhang wrote:
> On Tue, Jan 11, 2011 at 03:41:54PM +0530, Bharata B Rao wrote:
> > sched: Reinstate group names in /proc/sched_debug.
> > 
> > Displaying of group names in /proc/sched_debug was dropped in autogroup
> > patches. Add group names while displaying cfs_rq and tasks information.
> > 
> > Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> > ---
> >  kernel/sched_debug.c |   35 +++++++++++++++++++++++++++++++++++
> >  1 file changed, 35 insertions(+)
> > 
> > --- a/kernel/sched_debug.c
> > +++ b/kernel/sched_debug.c
> > @@ -16,6 +16,8 @@
> >  #include <linux/kallsyms.h>
> >  #include <linux/utsname.h>
> >  
> > +static DEFINE_SPINLOCK(sched_debug_lock);
> 
> I don't get your point on introducing this lock.
> Just to avoid concurrent access?

Yes.

> Or could you explain please?

The group name is generated in a global buffer which is protected by
this lock. Earlier small sized local buffer (on stack) was used for
this purpose which wasn't ideal. Also since we can be here from
interrupt context, I wanted to avoid allocation too. Hence went for
a global buffer protected by a lock.

Regards,
Bharata.

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

Thread overview: 14+ 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 [this message]
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 ` [PATCH -tip 2/2] sched: Display autogroup " Bharata B Rao
2011-01-18 19:05   ` [tip:sched/urgent] " 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

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=20110111134244.GJ4772@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 \
    --cc=yong.zhang0@gmail.com \
    --subject='Re: [PATCH -tip 1/2] [PATCH -tip 1/2] sched: Reinstate group 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).