Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp361352pxu; Tue, 6 Oct 2020 08:09:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHjTTSpfb1L4xk59EkDNAyxrqhx+RT9HZWEIg8DWhEU6PE8G0AzW8+KS+q+KVm6v0MhAr6 X-Received: by 2002:a50:9b5b:: with SMTP id a27mr5886793edj.374.1601996963081; Tue, 06 Oct 2020 08:09:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601996963; cv=none; d=google.com; s=arc-20160816; b=uZkdCxNu+lqfAWWnAJOG3hZ6rvjvEGdhvwxXSint4QQ+Ag2InSl8eZAtlbQ3dkdyR/ w+ZwTf1KWNmvdTcH9RBqumS6AtjYVO6N8P0NZJXLkC5hFwUavDtkDyA2yiUS04h0VGy5 uOiVLrtCUrJz06A3+oWO5v/PLqDw9zGgeDOQwPYpyjWmH6DjfmSHfz1CxrzIFxpUbT14 MtJz0NkyrE6W5sd+TsqsL4RETYM1bLHSRfUJxLDyU2lt1UBLPXYC48G3bc4dCASN3vTO qI8K4Zlv/4SFDg2U8eT9J4V6eS3EHXPCY2xIw/jcPdaHDPlxoDHl6RqmS4a6Nwxy37YJ S+dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=QmXheHJVTcYUQL5uws90v3lstflNZfS6MkHL+JNhDFY=; b=vBZtF8RKiy0QU5U3PdKx0hA/dgZNQrkhLRWeh0EODmwnY3g6qWjexAHIQzSpzQok1y XfngyFoHGAgJdO0brWZwW8OkWfSd+mr29T4oCcBmysfZG7QXZ+w5EbI8SROpioAljp/X Usc9MuMFauR8SbFf/o3//QuYfmsgqgRj5VrL7pDTpk2Ul9aeKBCEfRtqag4oCgh6KjRP u9Plt6zzT+lvLi42VBOJNkTRCiej7J8fglGiwuQhFcy/Q9rq9vFmVxN8DUQp0GaiPPn9 R8SW+eA02LRX947lFikx203kJvyy1j9SyEsy+sgggQEy6/sTALqvXqz5ViJaB4m/GRVD 3OEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y26si2113738edv.590.2020.10.06.08.08.55; Tue, 06 Oct 2020 08:09:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726068AbgJFPHq convert rfc822-to-8bit (ORCPT + 99 others); Tue, 6 Oct 2020 11:07:46 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:42115 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbgJFPHq (ORCPT ); Tue, 6 Oct 2020 11:07:46 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-209-WYOHOSPgPXCtjBzSb6bOjQ-1; Tue, 06 Oct 2020 16:07:42 +0100 X-MC-Unique: WYOHOSPgPXCtjBzSb6bOjQ-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 6 Oct 2020 16:07:41 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Tue, 6 Oct 2020 16:07:41 +0100 From: David Laight To: 'Peter Zijlstra' CC: "linux-toolchains@vger.kernel.org" , Will Deacon , Paul McKenney , "linux-kernel@vger.kernel.org" , "stern@rowland.harvard.edu" , "parri.andrea@gmail.com" , "boqun.feng@gmail.com" , "npiggin@gmail.com" , "dhowells@redhat.com" , "j.alglave@ucl.ac.uk" , "luc.maranget@inria.fr" , "akiyks@gmail.com" , "dlustig@nvidia.com" , "joel@joelfernandes.org" , "torvalds@linux-foundation.org" Subject: RE: Control Dependencies vs C Compilers Thread-Topic: Control Dependencies vs C Compilers Thread-Index: AQHWm9Z2gJDHxIOMJkCFRnXrafG7EamKgJsQgAAA4oCAACf9EA== Date: Tue, 6 Oct 2020 15:07:41 +0000 Message-ID: <0a0403a430b14484a026b52a5ecbbeeb@AcuMS.aculab.com> References: <20201006114710.GQ2628@hirez.programming.kicks-ass.net> <3dfe7daed3c44f46a6989b6513ad7bb0@AcuMS.aculab.com> <20201006133115.GT2628@hirez.programming.kicks-ass.net> In-Reply-To: <20201006133115.GT2628@hirez.programming.kicks-ass.net> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Please go read memory-barriers.txt for a bunch of other examples. My brain hurts. It's not as though I've not known about most of this since the first SMP capable SPARC cpus that had a 'store buffer'. (Probably 30 years ago.) I sometimes wonder whether compiling things like the kernel requires a compiler mode that defaults everything (except function locals) to 'volatile'. Although that still does fix control dependencies. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)