All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Namhyung Kim <namhyung.kim@lge.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH] perf top: Fix a race in callchain handling
Date: Sat, 12 May 2012 01:25:48 +0900	[thread overview]
Message-ID: <87boluwupf.fsf@gmail.com> (raw)
In-Reply-To: <20120511150111.GA2485@infradead.org> (Arnaldo Carvalho de Melo's message of "Fri, 11 May 2012 12:01:11 -0300")

Hi,

On Fri, 11 May 2012 12:01:11 -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, May 11, 2012 at 11:10:59AM +0900, Namhyung Kim escreveu:
>> On Mon, 07 May 2012 10:32:22 +0900, Namhyung Kim wrote:
>> > I thought about it before, but it still cannot protect it from accessing
>> > a hists by multiple concurrent threads. IOW if two threads call the
>> > function to a same hists at the same time, ->callchain_collapse_cursor
>> > would still get the race problem - so crashed.
>> >
>> > I guess callchain_cursor should be thread-local, eventually. No need to
>> > make it hist-local IMHO.
>> 
>> So, any thoughts?
>
> Can you try writing a patch using TLS?
>

Well, I can do it, but I still think the current patch is just enough
for now though. My concern is the TLS might make perf less portable
especially for embedded systems which are not using glibc.

Anyway I'll give it a spin as you ask.

Thanks,
Namhyung

      reply	other threads:[~2012-05-11 16:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05 15:23 [PATCH] perf top: Fix a race in callchain handling Namhyung Kim
2012-05-05 18:22 ` Peter Zijlstra
2012-05-05 23:53   ` Arnaldo Carvalho de Melo
2012-05-06  2:25     ` Namhyung Kim
2012-05-06 18:07       ` Arnaldo Carvalho de Melo
2012-05-07  1:22         ` Namhyung Kim
2012-05-06 18:32       ` Arnaldo Carvalho de Melo
2012-05-07  1:32         ` Namhyung Kim
2012-05-11  2:10           ` Namhyung Kim
2012-05-11 15:01             ` Arnaldo Carvalho de Melo
2012-05-11 16:25               ` Namhyung Kim [this message]

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=87boluwupf.fsf@gmail.com \
    --to=namhyung@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung.kim@lge.com \
    --cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.