lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110111134244.GJ4772@in.ibm.com>
Date:	Tue, 11 Jan 2011 19:12:44 +0530
From:	Bharata B Rao <bharata@...ux.vnet.ibm.com>
To:	Yong Zhang <yong.zhang0@...il.com>
Cc:	linux-kernel@...r.kernel.org, Mike Galbraith <efault@....de>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH -tip 1/2] [PATCH -tip 1/2] sched: Reinstate group names
 in /proc/sched_debug.

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@...ux.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ