Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2281380imm; Thu, 7 Jun 2018 08:08:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIkoWOv7BbjsvdmJVNas4GfjDIx1pQHE1vS1blp85Ujvv/H4dH94ORZ6HHY4C34lqtxdF50 X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr2459550pla.125.1528384114321; Thu, 07 Jun 2018 08:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528384114; cv=none; d=google.com; s=arc-20160816; b=PepqMDtw3IimrWB8bGpCbgIJrJX1QDPX7m4nu2IA/USQABMkmLuuY+QRn+G+DxQNiX 5V5UIXT77z8ntvXhcteaUGq7V7pTx9jSjtyWIyOtVuMgrJ54T5VXgwXzNGJ8hpvacD+g Jp6qySqQuPxkYiaKhJn1unMR3Vs5jRSx2142QwOcKKP7xBr8YhtyDp1IrKU99956mxYk 51NXH00CbSTywcg4HMKziNZYqzTb//8E+80SoWeW5zvXZiFjfExOM10Jr42rlFrivtE6 etv5mafRYrSIPnSxRnbUK6eAPVzwKClfSJDq1aMnQYwFMnR4QvyY2RP7+z//rmEyz+Kv JxVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=bYTGoc7nhJ89GP/6tSzeuSfobCsTBBXkV5rQ2gH5iPE=; b=IjkRJHpZJSUhJVwhnGcyV8We5pgSFtfbcxvxXJojzIFcQF72+BOs2oZ0T46niFHIJa h/XvJI0k40wgykDvoDaY1SEtoMaoYjNEGwA7rJF91FyMkQNSzRDURayD9Gh9uG6+w2HB gV7PgPBnfdOTGtkmX+ZFXda/mfXBiN4iFfzZPPQSNGhL4NI4pAIGswRmMrqwICQmba4u HoDjs8lekkZ5CMREQNdme9aPR5Z3lxx4ngaokShFfAQgnOgWJBVjnem68I0KgdzaW5iu /LvgOkWELhC9w8kGl6Kk2XD8RXAlkvA0dJgdEdcpIEw25mZWb+XL9HYBFZzWxqikDKxG cP2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Q+ttrOKF; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16-v6si20737661pgv.240.2018.06.07.08.08.19; Thu, 07 Jun 2018 08:08:34 -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=@linux-foundation.org header.s=google header.b=Q+ttrOKF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936016AbeFGPHG (ORCPT + 99 others); Thu, 7 Jun 2018 11:07:06 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:35046 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935887AbeFGPHE (ORCPT ); Thu, 7 Jun 2018 11:07:04 -0400 Received: by mail-it0-f44.google.com with SMTP id a3-v6so13088316itd.0; Thu, 07 Jun 2018 08:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bYTGoc7nhJ89GP/6tSzeuSfobCsTBBXkV5rQ2gH5iPE=; b=Q+ttrOKF2nNeCbvLPv5R9T6xHvm4QIEew/R2Hdaf8OrNJ3y63fN4BmRD+CIfzsLzeJ jx9ATCQAEFYPjUQAJhh6/VXfIihl1r3mpXis5SfWGMg6BIiSyfS12GRHBN5/WgKnjPck ZtOOKq37IVK49shFzpRgB5xe+Nh7731mEbors= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bYTGoc7nhJ89GP/6tSzeuSfobCsTBBXkV5rQ2gH5iPE=; b=rwcW/gV3wDggzzbrXpT6tooJ6LohKHdTaYY7FpeLG8/cOPc3OT1byiEvmOkaRn3unt f1vMRyTUKmdcC6evPKzMj92/qHAd9X4oBNLS0NcEEP5UGIUQf5u/RajgbeXUtNtSZRpQ VpDlBm4MsbPNi+CAXkpsA2yWcteoEsN8D6xi0zLWn4fdaqzsPhSsHz7JcemFRQ33OA1+ 5SI+aSXfHZNzQrJa7ifq+f28r8hx0tkhAkUtHYSWAIg1KrWUwJ3b9INH03NxwLp2DnyX 4tlzW1COUldxpeJ/iSnFjAfa1J7L9VhPd2nZXjqeMYcO6tTE52Uqy1nacTD3KF0NleCI K/+A== X-Gm-Message-State: APt69E0CwRa1FCVTE9zZ/w10ORIUiKI6rvnswI1OmNmeLJNnn7FQzMkB g0tbv5CDecRfffWT8waQ+WwtclcMepib+HikFoY= X-Received: by 2002:a24:6b14:: with SMTP id v20-v6mr2254594itc.100.1528384023176; Thu, 07 Jun 2018 08:07:03 -0700 (PDT) MIME-Version: 1.0 References: <20180530183826.GI7063@linux.vnet.ibm.com> <20180606190710.GY3593@linux.vnet.ibm.com> <20180607094314.GF3593@linux.vnet.ibm.com> In-Reply-To: <20180607094314.GF3593@linux.vnet.ibm.com> From: Linus Torvalds Date: Thu, 7 Jun 2018 08:06:51 -0700 Message-ID: Subject: Re: LKMM litmus test for Roman Penyaev's rcu-rr To: Paul McKenney Cc: Roman Pen , Alan Stern , Linux Kernel Mailing List , linux-arch , andrea.parri@amarulasolutions.com, Will Deacon , Peter Zijlstra , Boqun Feng , Nick Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa , Ingo Molnar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 7, 2018 at 2:41 AM Paul E. McKenney wrote: > > We are considering adding unmarked accesses, for example, accesses > protected by locks. One possible litmus test (not yet supported!) > might look like this: Fair enough - you do want to have the distinction between "marked" and "unmarked". And it does make sense, although at that point I think you do hit the "what can a compiler do" issue more. Right now, I think the things you check are all pretty much "compiler can't do a lot of movement". But I suspect that the markings you do have are going to be fairly limited. Things like "READ_ONCE()" vs "smp_read_acquire()" are still fairly simple from a compiler standpoint, at least when it comes to control flow - they have "side effects". So I guess that's the only real difference there - a regular read doesn't have side effects, so it could be moved up past a conditional, and/or duplicated for each use. That sounds much more complex to the checker than the existing things it supports, no? Linus