All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Reshetova, Elena" <elena.reshetova@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"acme@kernel.org" <acme@kernel.org>,
	"namhyung@kernel.org" <namhyung@kernel.org>,
	"alexander.shishkin@linux.intel.com" 
	<alexander.shishkin@linux.intel.com>,
	"jolsa@redhat.com" <jolsa@redhat.com>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Subject: Re: [PATCH 1/3] perf: convert perf_event_context.refcount to refcount_t
Date: Wed, 30 Jan 2019 10:01:47 +0100	[thread overview]
Message-ID: <20190130090147.GB2278@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <2236FBA76BA1254E88B949DDB74E612BA4B98D3A@IRSMSX102.ger.corp.intel.com>

On Tue, Jan 29, 2019 at 01:55:32PM +0000, Reshetova, Elena wrote:
> > 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.
> 
> But is this true for the x86 arch-specific implementation also? 

Dunno; but when debugging you should not have those enabled anyway.

  reply	other threads:[~2019-01-30  9:01 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
2019-01-29 13:55     ` Reshetova, Elena
2019-01-30  9:01       ` Peter Zijlstra [this message]
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=20190130090147.GB2278@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 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.