From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A93BDC4743E for ; Tue, 8 Jun 2021 17:06:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 771716128A for ; Tue, 8 Jun 2021 17:06:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 771716128A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HHe/uUGpr8xwL/Ie+xsHN60YYJ34Ak+ymek2RUE3pSI=; b=Lx4gym8D8EuMWB 8n7Km72f3omjbUeloPGmfCDGtKbfcMla/o4zrfcaa0qYNMQ9xK5pt4XRnbJq33H7UE3hIA8tKtI4X dVhFYemCm4MMpFH3t5BYvkg0LW6xX7Z1M6j0UQihCFoUOIPBr3u/xPLEzpVnDi9bqbB4mvPTzPsqV dLrW0Xh0U1lp6FZiuYCCNkPStefMnUusV8UgTIbB8IiXWfIzYnFYmMi6sQ+532UwnYPSYD2VtKL6J j8BtxeiSWpQqdiU9KXbS/KvN1QkljlIxdngTnWrNBZQ5wpsRCHKfAjMKDkaDF0Oxh8bsKAvDmetce GSDLgfGAeZtLoy7l62fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqf9Y-009gOE-GQ; Tue, 08 Jun 2021 17:04:36 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqf9W-009gNP-FV for linux-arm-kernel@bombadil.infradead.org; Tue, 08 Jun 2021 17:04:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=RN6+afhXiXZupdmFoHhfjzrNJcgZk+vcIMH9KaAPAOM=; b=iRUvhj/EinnRVrKzz1bu5fz7Zb N8cJmv2nlpRjXPSCzBu4QEXQaJ7Acc4FAWeHKaejuQGK3ffIOQdDx24mJw5NyvKAJ0UNlPHrTz65f 0SoM2WAX89kMlb3jgwutGos1mr/jX8RTVeDzE+xNXiWA7//bzTgLrr6MfuwrzyigYVQrWwjcDSMHu xvpjnYe4JUwi5ct2HmsfRk/IwuiIb4ospT+/1BlVBOGNGLB/q0hW+GX/f2GJTDFNiUo+0AHacmGqZ djCsRJj255PUe+Sg8dVCzA4nMWoVnD3QHA699NxfyE+GjNK3Y4IuOqLGrxDMFvA/rKx3ubT+Tk7mA fLATOrbQ==; Received: from [179.97.37.151] (helo=quaco.ghostprotocols.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqf9N-004ock-Sm; Tue, 08 Jun 2021 17:04:32 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 3E67640B1A; Tue, 8 Jun 2021 14:04:30 -0300 (-03) Date: Tue, 8 Jun 2021 14:04:30 -0300 From: Arnaldo Carvalho de Melo To: Peter Zijlstra Cc: Leo Yan , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , x86@kernel.org, "H. Peter Anvin" , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Adrian Hunter , Andi Kleen , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 7/8] perf auxtrace: Use WRITE_ONCE() for updating aux_tail Message-ID: References: <20210602103007.184993-1-leo.yan@linaro.org> <20210602103007.184993-8-leo.yan@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Mon, Jun 07, 2021 at 05:31:01PM +0200, Peter Zijlstra escreveu: > On Wed, Jun 02, 2021 at 06:30:06PM +0800, Leo Yan wrote: > > Use WRITE_ONCE() for updating aux_tail, so can avoid unexpected memory > > behaviour. > > > > Signed-off-by: Leo Yan > > Acked-by: Peter Zijlstra (Intel) Leo, this one is dependendant on the 6/8, will wait for a resubmission, keeping 5/8 tho, as was Acked and applies cleanly, perf/core. > > --- > > tools/perf/util/auxtrace.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h > > index e625bc76cdde..abc4282f5272 100644 > > --- a/tools/perf/util/auxtrace.h > > +++ b/tools/perf/util/auxtrace.h > > @@ -458,7 +458,7 @@ static inline void auxtrace_mmap__write_tail(struct auxtrace_mmap *mm, u64 tail) > > > > /* Ensure all reads are done before we write the tail out */ > > smp_mb(); > > - pc->aux_tail = tail; > > + WRITE_ONCE(pc->aux_tail, tail); > > } > > > > int auxtrace_mmap__mmap(struct auxtrace_mmap *mm, > > -- > > 2.25.1 > > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel