lkml.org 
[lkml]   [2017]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC V4 1/6] perf tools: lock to protect namespaces and comm list
Em Mon, Oct 02, 2017 at 07:14:10PM +0000, Liang, Kan escreveu:
> > Em Fri, Sep 29, 2017 at 07:47:52AM -0700, kan.liang@intel.com escreveu:
> > > From: Kan Liang <kan.liang@intel.com>
> > >
> > > Add two locks to protect namespaces_list and comm_list.
> > >
> > > The lock is only needed for multithreaded code, so using mutex
> > > wrappers provided by perf tool.
> > >
> > > Not all the comm_list/namespaces_list accessing are protected, e.g.
> > > thread__exec_comm. Because the multithread code for perf top event
> > > synthesizing does not touch them. They don't need a lock.
> >
> > They don't need a lock _now_, ok I think we can proceed that way, this cset
> > should serve as a warning to people working in further multithreading perf.
> >
>
> Do I need to add some comments in the code to give a warning?

Maybe, but then one can use 'git blame' and see the comments on the
patch introducing the locking.

BTW, I'm applied and tested it, pushed to acme/perf/core.

- Arnaldo

\
 
 \ /
  Last update: 2017-10-02 21:35    [W:0.053 / U:2.080 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site