From: Peter Zijlstra <peterz@infradead.org>
To: Elena Reshetova <elena.reshetova@intel.com>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, acme@kernel.org,
namhyung@kernel.org, alexander.shishkin@linux.intel.com,
jolsa@redhat.com, keescook@chromium.org, tglx@linutronix.de
Subject: Re: [PATCH 1/3] perf: convert perf_event_context.refcount to refcount_t
Date: Tue, 29 Jan 2019 10:37:48 +0100 [thread overview]
Message-ID: <20190129093748.GF28467@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1548678448-24458-2-git-send-email-elena.reshetova@intel.com>
On Mon, Jan 28, 2019 at 02:27:26PM +0200, Elena Reshetova wrote:
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 3cd13a3..a1e87d2 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -1171,7 +1171,7 @@ static void perf_event_ctx_deactivate(struct perf_event_context *ctx)
>
> static void get_ctx(struct perf_event_context *ctx)
> {
> - WARN_ON(!atomic_inc_not_zero(&ctx->refcount));
> + WARN_ON(!refcount_inc_not_zero(&ctx->refcount));
This could be refcount_inc(), remember how that already produces a WARN
when we try and increment 0.
next prev parent reply other threads:[~2019-01-29 9:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 12:27 [PATCH 0/3] perf refcount_t conversions Elena Reshetova
2019-01-28 12:27 ` [PATCH 1/3] perf: convert perf_event_context.refcount to refcount_t Elena Reshetova
2019-01-29 9:37 ` Peter Zijlstra [this message]
2019-01-29 13:55 ` Reshetova, Elena
2019-01-30 9:01 ` Peter Zijlstra
2019-02-01 10:32 ` Mark Rutland
2019-02-01 15:44 ` Reshetova, Elena
2019-02-01 16:23 ` Mark Rutland
2019-02-04 8:51 ` [tip:perf/core] perf: Convert " tip-bot for Elena Reshetova
2019-01-28 12:27 ` [PATCH 2/3] perf/ring_buffer: convert ring_buffer.refcount " Elena Reshetova
2019-02-04 8:52 ` [tip:perf/core] perf/ring_buffer: Convert " tip-bot for Elena Reshetova
2019-01-28 12:27 ` [PATCH 3/3] perf/ring_buffer: convert ring_buffer.aux_refcount " Elena Reshetova
2019-02-04 8:53 ` [tip:perf/core] perf/ring_buffer: Convert " tip-bot for Elena Reshetova
2019-01-29 9:39 ` [PATCH 0/3] perf refcount_t conversions Peter Zijlstra
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=20190129093748.GF28467@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=elena.reshetova@intel.com \
--cc=jolsa@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/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