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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 0CDABC3A589 for ; Tue, 20 Aug 2019 20:32:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D745222DD3 for ; Tue, 20 Aug 2019 20:32:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730860AbfHTUcO (ORCPT ); Tue, 20 Aug 2019 16:32:14 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60502 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730728AbfHTUcN (ORCPT ); Tue, 20 Aug 2019 16:32:13 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7KKROPK045220; Tue, 20 Aug 2019 16:31:36 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ugpf23w03-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Aug 2019 16:31:36 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x7KKSI73048112; Tue, 20 Aug 2019 16:31:35 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ugpf23vy5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Aug 2019 16:31:35 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x7KKRERn017378; Tue, 20 Aug 2019 20:31:34 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma04dal.us.ibm.com with ESMTP id 2ue976yb5v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Aug 2019 20:31:34 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x7KKVY4r48890254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Aug 2019 20:31:34 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0484FB2064; Tue, 20 Aug 2019 20:31:34 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D998DB205F; Tue, 20 Aug 2019 20:31:33 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.154]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 20 Aug 2019 20:31:33 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 1665816C13CD; Tue, 20 Aug 2019 13:31:35 -0700 (PDT) Date: Tue, 20 Aug 2019 13:31:35 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Linus Torvalds , Valentin Schneider , Joel Fernandes , Thomas Gleixner , Alan Stern , Mathieu Desnoyers , rostedt , linux-kernel , Boqun Feng , Will Deacon , David Howells Subject: Re: [PATCH 1/1] Fix: trace sched switch start/stop racy updates Message-ID: <20190820203135.GX28441@linux.ibm.com> Reply-To: paulmck@linux.ibm.com References: <241506096.21688.1565977319832.JavaMail.zimbra@efficios.com> <20190816205740.GF10481@google.com> <3c0cb8a2-eba2-7bea-8523-b948253a6804@arm.com> <20190817045217.GZ28441@linux.ibm.com> <20190820140116.GT2332@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190820140116.GT2332@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-20_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=978 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908200183 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 20, 2019 at 04:01:16PM +0200, Peter Zijlstra wrote: > On Fri, Aug 16, 2019 at 09:52:17PM -0700, Paul E. McKenney wrote: > > On Fri, Aug 16, 2019 at 03:57:43PM -0700, Linus Torvalds wrote: > > > > [ . . . ] > > > > > We add READ_ONCE and WRITE_ONCE annotations when they make sense. Not > > > because of some theoretical "compiler is free to do garbage" > > > arguments. If such garbage happens, we need to fix the compiler, the > > > same way we already do with > > > > > > -fno-strict-aliasing > > > > Yeah, the compete-with-FORTRAN stuff. :-/ > > > > There is some work going on in the C committee on this, where the > > theorists would like to restrict strict-alias based optimizations to > > enable better analysis tooling. And no, although the theorists are > > pushing in the direction we would like them to, as far as I can see > > they are not pushing as far as we would like. But it might be that > > -fno-strict-aliasing needs some upgrades as well. I expect to learn > > more at the next meeting in a few months. > > > > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2364.pdf > > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2363.pdf > > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2362.pdf > > We really should get the compiler folks to give us a > -fno-pointer-provenance. Waiting on the standards committee to get their > act together seems unlikely, esp. given that some people actually seem > to _want_ this nonsense :/ The reason that they want it is to enable some significant optimizations in numerical code on the one hand and in heavily templated C++ code on the other. Neither of which has much bearing on kernel code. Interested in coming to the next C standards committee meeting in October to help me push for this? ;-) Thanx, Paul