From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932930AbcH2On7 (ORCPT ); Mon, 29 Aug 2016 10:43:59 -0400 Received: from mga06.intel.com ([134.134.136.31]:58995 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755800AbcH2On6 (ORCPT ); Mon, 29 Aug 2016 10:43:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,596,1464678000"; d="scan'208";a="1021785493" From: Alexander Shishkin To: Peter Zijlstra 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 In-Reply-To: <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> <20160829141437.GU10153@twins.programming.kicks-ass.net> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 29 Aug 2016 17:43:51 +0300 Message-ID: <87d1krljo8.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Zijlstra writes: > 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? Yes, only the testcase exploded again over the weekend, looking at it again. Regards, -- Alex