Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1054240ybl; Wed, 21 Aug 2019 09:25:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4Ajpwdt/HthVYhbIjlWtH9/0v9Y99S0pHsJstDLBVFdxKbw01RIDeGP2ddxN9es0GhZwh X-Received: by 2002:aa7:82da:: with SMTP id f26mr36938099pfn.82.1566404740672; Wed, 21 Aug 2019 09:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566404740; cv=none; d=google.com; s=arc-20160816; b=gG4yHBcuCcEzTai9LNb4KmA9X41g+nBj9KYm7tDNB4EvkzLvu43vIDNsDHne+E6MJ9 sZc5CAK+aqd2I2+Y4g7HGUo8SQ8q8Itlws4PsuzxJoO8aNtrcbs8Yn2Fhk3uYiNm5cGw N9aJbAiLzBj+49ddVK54N8J9Izuj6nbgX9fXV7MmckPVilBHAPylopQE1avl967yDXAG 0Bj+iKheW+imc5uspeyEzwuCq4nAMXKkU7aEt2tMCJjwOwdAZYDpe18q04nvjexI9gyQ QDmIoA1UGfNO4mwZwtJ2kdJgOkX3aV2EmrsJUPrix6U1b17c+MqRJzDP4AVs56H9uMFD oILA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Z+dM7u4rCR/S5WM0KTaoPFDfJUYdS4hcQln/F0YjN7o=; b=LLxT/jwONJKjH84ffhYCnfrJEWH5ybrWEOFyzyyLbU/he10oriW0TrGKs/J/dXIrSR kuSnGZveSi/90wrTTacnuvV8dkReKDYzqwWs77jRJoU/A/w8MLtqDAemQtIVprqy/yZY PhTgqx0pS9tpfU3omDoztiiwkkOUXTYeRgbVB/M3j0LA2LbUlmgGK7zSA0AybADIEq69 1nnQ6pIRibNkFhgav5ew5Sn4TAx063fZxLfuh6ObGS5Vfi/bbDlNF9959YpW7/oAh/tw M5MbUGjkzoxrkwy10j2kU5dsDIjitUteevHKieV7hsy3bHMtkwHPyIIunEWK0nxfNDEb rzZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s+Onsyrb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o15si15381015pll.20.2019.08.21.09.25.25; Wed, 21 Aug 2019 09:25:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s+Onsyrb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729083AbfHUQWb (ORCPT + 99 others); Wed, 21 Aug 2019 12:22:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:51516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727975AbfHUQWa (ORCPT ); Wed, 21 Aug 2019 12:22:30 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7AEBC22DA7; Wed, 21 Aug 2019 16:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566404549; bh=uKsVNis+LsCYM1npzutJ33qZg3nrwWpmgnmroIqEDT8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s+Onsyrbs0XKyrv41eDp7HLcxHvh7N2mqUuLgVCfngayJwLIgKaCSWLsbTSoFCe1F 7rqzKWwlbCVdS9GXmCfQa863TJGRWMAgzayHYp/rEbae4BaVHi08to9Es72A3T1vQk Vmk/UVgzZdTasd8DvgumijBKiaL8jQzlyf9ZHFkw= Date: Wed, 21 Aug 2019 17:22:24 +0100 From: Will Deacon To: "Paul E. McKenney" Cc: Peter Zijlstra , Linus Torvalds , Mathieu Desnoyers , Thomas Gleixner , Joel Fernandes , Alan Stern , rostedt , Valentin Schneider , linux-kernel , Boqun Feng , Will Deacon , David Howells Subject: Re: [PATCH 1/1] Fix: trace sched switch start/stop racy updates Message-ID: <20190821162224.vduxnioxdm3m5vgh@willie-the-truck> References: <1642847744.23403.1566005809759.JavaMail.zimbra@efficios.com> <20190820135612.GS2332@hirez.programming.kicks-ass.net> <20190820202932.GW28441@linux.ibm.com> <20190821103200.kpufwtviqhpbuv2n@willie-the-truck> <20190821132310.GC28441@linux.ibm.com> <20190821133247.vke6fnndm64h2lla@willie-the-truck> <20190821135610.GD28441@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190821135610.GD28441@linux.ibm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 21, 2019 at 06:56:10AM -0700, Paul E. McKenney wrote: > On Wed, Aug 21, 2019 at 02:32:48PM +0100, Will Deacon wrote: > > On Wed, Aug 21, 2019 at 06:23:10AM -0700, Paul E. McKenney wrote: > > > On Wed, Aug 21, 2019 at 11:32:01AM +0100, Will Deacon wrote: > > > > void bar(u64 *x) > > > > { > > > > *(volatile u64 *)x = 0xabcdef10abcdef10; > > > > } > > > > > > > > then I get: > > > > > > > > bar: > > > > mov w1, 61200 > > > > movk w1, 0xabcd, lsl 16 > > > > str w1, [x0] > > > > str w1, [x0, 4] > > > > ret > > > > > > > > so I'm not sure that WRITE_ONCE would even help :/ > > > > > > Well, I can have the LWN article cite your email, then. So thank you > > > very much! > > > > > > Is generation of this code for a 64-bit volatile store considered a bug? > > > > I consider it a bug for the volatile case, and the one compiler person I've > > spoken to also seems to reckon it's a bug, so hopefully it will be fixed. > > I'm led to believe it's an optimisation in the AArch64 backend of GCC. > > Here is hoping for the fix! > > > > Or does ARMv8 exclude the possibility of 64-bit MMIO registers? And I > > > would guess that Thomas and Linus would ask a similar bugginess question > > > for normal stores. ;-) > > > > We use inline asm for MMIO, fwiw. > > I should have remembered that, shouldn't I have? ;-) > > Is that also common practice across other embedded kernels these days? I think so. Sometimes you care about things like the addressing mode being used, so it's easier to roll it by hand. Will