From: Jiri Olsa <jolsa@redhat.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 1/3] perf: Rollback callchain buffer refcount under the callchain mutex
Date: Fri, 9 Aug 2013 12:28:02 +0200 [thread overview]
Message-ID: <20130809102802.GC1045@krava.brq.redhat.com> (raw)
In-Reply-To: <1375460996-16329-2-git-send-email-fweisbec@gmail.com>
On Fri, Aug 02, 2013 at 06:29:54PM +0200, Frederic Weisbecker wrote:
> When we fail to allocate the callchain buffers, we rollback the refcount
> we did and return from get_callchain_buffers().
>
> However we take the refcount and allocate under the callchain lock
> but the rollback is done outside the lock.
>
> As a result, while we rollback, some concurrent callchain user may
> call get_callchain_buffers(), see the non-zero refcount and give up
> because the buffers are NULL without itself retrying the allocation.
>
> The consequences aren't that bad but that behaviour looks weird enough and
> it's better to give their chances to the following callchain users where
> we failed.
>
> Reported-by: Jiri Olsa <jolsa@redhat.com>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Jiri Olsa <jolsa@redhat.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
next prev parent reply other threads:[~2013-08-09 10:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 16:29 [PATCH 0/3] perf: Fixes on event accounting Frederic Weisbecker
2013-08-02 16:29 ` [PATCH 1/3] perf: Rollback callchain buffer refcount under the callchain mutex Frederic Weisbecker
2013-08-09 10:28 ` Jiri Olsa [this message]
2013-08-16 18:47 ` [tip:perf/core] perf: Roll back " tip-bot for Frederic Weisbecker
2013-08-02 16:29 ` [PATCH 2/3] perf: Account freq events globally Frederic Weisbecker
2013-08-09 10:33 ` Jiri Olsa
2013-08-16 18:47 ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2013-08-02 16:29 ` [PATCH 3/3] nohz: Include local CPU in full dynticks global kick Frederic Weisbecker
2013-08-16 18:46 ` [tip:timers/nohz] " tip-bot for Frederic Weisbecker
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=20130809102802.GC1045@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@redhat.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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