From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757259AbcH2OPQ (ORCPT ); Mon, 29 Aug 2016 10:15:16 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:53593 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756135AbcH2OPP (ORCPT ); Mon, 29 Aug 2016 10:15:15 -0400 Date: Mon, 29 Aug 2016 16:14:37 +0200 From: Peter Zijlstra To: Alexander Shishkin Cc: vince@deater.net, Ingo Molnar , linux-kernel@vger.kernel.org, eranian@google.com, Arnaldo Carvalho de Melo Subject: Re: [PATCH 1/3] perf/x86/intel/bts: Fix confused ordering of PMU callbacks Message-ID: <20160829141437.GU10153@twins.programming.kicks-ass.net> References: <1471942474-1854-1-git-send-email-alexander.shishkin@linux.intel.com> <1471942474-1854-2-git-send-email-alexander.shishkin@linux.intel.com> <87mvk2l5ax.fsf@ashishki-desk.ger.corp.intel.com> <87fupul0bp.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fupul0bp.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2016 at 05:15:54PM +0300, Alexander Shishkin wrote: > @@ -221,10 +245,13 @@ static void __bts_event_start(struct perf_event *event) > > /* > * local barrier to make sure that ds configuration made it > - * before we enable BTS > + * before we enable BTS and bts::state goes ACTIVE > */ > wmb(); > > + /* INACTIVE/STOPPED -> ACTIVE */ > + WRITE_ONCE(bts->state, BTS_STATE_ACTIVE); > + > intel_pmu_enable_bts(config); > > } Alexander, were you going to post a new version of this patch without the barrier confusion?