From: Jiri Olsa <jolsa@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Don Zickus <dzickus@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Mike Galbraith <efault@gmx.de>,
Namhyung Kim <namhyung@kernel.org>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 3/5] perf tools: Reference count map_groups objects
Date: Wed, 23 Apr 2014 18:31:18 +0200 [thread overview]
Message-ID: <20140423163117.GA5048@krava.brq.redhat.com> (raw)
In-Reply-To: <534D77B2.1070404@gmail.com>
On Tue, Apr 15, 2014 at 12:17:22PM -0600, David Ahern wrote:
> On 4/15/14, 3:56 AM, Jiri Olsa wrote:
> >
> >hum.. I think using atomic type is not enough, we'd need
> >to make map_groups__put/get atomic as well
> >
> >not sure what's the support in user space for that.. will check
> >
> >also not to be negative, but libperf is not thread safe anyway, right? ;-)
>
> should be. pretty certain there have been bug reports (e.g,
> perf-top) that stumble onto problems and they get fixed.
I checked and there's no problem with this in perf top, because
all thread allocations and frees (included map_groups) are done
within the main (one) thread
You could get in trouble if you'd call map_groups__get and
map_groups__put over same map_groups object from different
threads, but this never happens in perf
Thats the same sort of issue you would get if you called
machine__findnew_thread over same machine from 2 threads
I think that potential libperf users should be aware of the
proper usage or they should ask for change
thoughts? ;-) thanks,
jirka
next prev parent reply other threads:[~2014-04-23 16:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 15:51 [PATCHv2 0/5] perf tools: Share map groups within process Jiri Olsa
2014-04-14 15:51 ` [PATCH 1/5] perf tests: Add thread maps lookup automated tests Jiri Olsa
2014-04-29 6:46 ` [tip:perf/core] " tip-bot for Jiri Olsa
2014-04-14 15:52 ` [PATCH 2/5] perf tools: Allocate thread map_groups's dynamically Jiri Olsa
2014-04-29 6:46 ` [tip:perf/core] perf tools: Allocate thread map_groups' s dynamically tip-bot for Arnaldo Carvalho de Melo
2014-04-14 15:52 ` [PATCH 3/5] perf tools: Reference count map_groups objects Jiri Olsa
2014-04-14 17:22 ` David Ahern
2014-04-15 9:56 ` Jiri Olsa
2014-04-15 18:17 ` David Ahern
2014-04-23 16:31 ` Jiri Olsa [this message]
2014-04-23 16:45 ` David Ahern
2014-04-29 6:46 ` [tip:perf/core] " tip-bot for Arnaldo Carvalho de Melo
2014-04-14 15:52 ` [PATCH 4/5] perf tools: Share map_groups among threads of the same group Jiri Olsa
2014-04-29 6:46 ` [tip:perf/core] " tip-bot for Jiri Olsa
2014-04-14 15:52 ` [PATCH 5/5] perf tests: Add map groups sharing with thread object test Jiri Olsa
2014-04-24 14:29 ` Namhyung Kim
2014-04-29 6:46 ` [tip:perf/core] " tip-bot for Jiri Olsa
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=20140423163117.GA5048@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=dzickus@redhat.com \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
/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
Powered by JetHome