Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1369995ybk; Thu, 14 May 2020 07:22:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU18DaZGZJ/A673ANuzrhOR66m38+03oiL+hUGMlRe4nau2+sSwr/jRab2nVij/iVblRDX X-Received: by 2002:a50:8750:: with SMTP id 16mr4024954edv.309.1589466174651; Thu, 14 May 2020 07:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589466174; cv=none; d=google.com; s=arc-20160816; b=v5pYChXWaz+qPAiOGJ85rQHrdbbmOb4V2BFVg/uvS3OCUwlletF2tOmH8sIc7+OTAh 4zbNt33NBT+uNNxWZZ1iWYeVZo38wh9mqHx8UuqB5Z4nVdVG6Jo03s2sJILbKN4jCHC8 dcuqPJiZ0GkODXIKTKvxF50LVoU5OVo8OgH8sQKKVBbpIlbAlzH502TSqVWVrACvZIxg qdawaiUEXV9SlKfuP30HtEz5rV9VmbP4dLgfOFgpehS6kchhVq48q09sboDB1YGY/sYz W6PAJqZmNwhok/iG9h0jUryrUHBrnL4sROwmY/PJYyvG1xxsWmMGNUe0OEa06A0PoE11 njBA== 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; bh=kr3umhTv0KENiyp0wU7PxiKM+as47imy2UfDBknXLLk=; b=Ekrx0vDJJ3dWwon3GrppAMgllt43W2C+8JvLqJjOE0sv0q7rd7D34t9A0ZFxzsv7Ou Yf8YsLld2zUKN5tvCedutPk70mIj4tdpJKi62PIKkgZSMGZZy2/0cEgxsWYMTraLIui/ 8gbd0Zxi2M9okuF9AFWML06tgs5gY0nli5aVBQwB+Wp9etvJjTQPLtgbhvUAy5mYhosf WzTTem9gSovGKkImxcD40nxngHYaUWQxsEMenzw+zCjTkec4+h0mYHvIXfy3u/gf85NP Dr6v/gQMnm92Wl2/unpe4nsBywX9G59Wzt9PRlsmbpaG7wnFlVkmGbNWUIMGDppdDPK/ EHzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=U7GifXij; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz11si1933653ejb.151.2020.05.14.07.22.28; Thu, 14 May 2020 07:22:54 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=U7GifXij; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726176AbgENOU4 (ORCPT + 99 others); Thu, 14 May 2020 10:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726051AbgENOU4 (ORCPT ); Thu, 14 May 2020 10:20:56 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B6C2C061A0C for ; Thu, 14 May 2020 07:20:56 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id i5so1202189uaq.1 for ; Thu, 14 May 2020 07:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kr3umhTv0KENiyp0wU7PxiKM+as47imy2UfDBknXLLk=; b=U7GifXijyReSXUq3LmOzUs4pV9Xx3CqZd0FQQF9oXyQwnBfla1LWxzXZdthLHqBngv AtshgLS6WPzb3SY+PYTphziTFvxexbY9S0ugZ84rnSyKSRtVH1Xd19VW6U6xnL8YsQXL GTJ5s82/CMLf86w3sdGo6poFV8M4tg8pprU+sBnQZm43EO0ivTg6PrSnpz2m62kJ1rIu DpTdon54LpMiJpEkmXZjXwdw+uQQ+yNzcA/5aL1y9tZCU0BfjuPNidsaeeDSW0BJm0W3 lN3ySCmEb3y1hXc3AJQ5479GzlVGaCRGzkbXbomtHNwUkgCFzbFeOXflIE2WAE1Rt656 CesQ== 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=kr3umhTv0KENiyp0wU7PxiKM+as47imy2UfDBknXLLk=; b=nYcPRm/AC1PILyN/u6yggVA8n6XT01NvF112/lU7gEcLCBL00fXu/AFwcBwLqSq8rn Val4HB4cDyBoh6z9+REHXTQtRoUyRDqwx9FOxPYHhRWDjFTyJ917N74/vk0CGPm71hIr dz+kpCnpc1ZaLvz9F0uZvVmH345/vdFj+mJ08cXlx8GpXW5byis9MYBgbuUfn5uqxTeg Nql32eyDtoTxVu8tazV1f5BBZM+LIOoKINZSEeuBWgLUh0Rza7a6Os22iyakWOADn+nX A5oXWAgQOHDzmuezsxNYMm1O13v8MsgXohzkasyLOyGFojQ1y86RWofseb8aGqUUqG08 R/ow== X-Gm-Message-State: AOAM531TdIeryBnkIbsDqlj8RubHJNt0+JRHBjuCfU4m6FWfaPDpArsJ 4lVt1wyISZJyQN0fsINTm7rJLRv/yDpJbZVFluhRnA== X-Received: by 2002:a9f:31cb:: with SMTP id w11mr4204971uad.128.1589466055185; Thu, 14 May 2020 07:20:55 -0700 (PDT) MIME-Version: 1.0 References: <20200512190755.GL2957@hirez.programming.kicks-ass.net> <20200513111057.GN2957@hirez.programming.kicks-ass.net> <20200513123243.GO2957@hirez.programming.kicks-ass.net> <20200513124021.GB20278@willie-the-truck> <20200513132440.GN2978@hirez.programming.kicks-ass.net> <20200514141344.GB2978@hirez.programming.kicks-ass.net> In-Reply-To: <20200514141344.GB2978@hirez.programming.kicks-ass.net> From: Marco Elver Date: Thu, 14 May 2020 16:20:42 +0200 Message-ID: Subject: Re: [PATCH v5 00/18] Rework READ_ONCE() to improve codegen To: Peter Zijlstra Cc: Will Deacon , LKML , Thomas Gleixner , "Paul E. McKenney" , Ingo Molnar , Dmitry Vyukov 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, 14 May 2020 at 16:13, Peter Zijlstra wrote: > > On Wed, May 13, 2020 at 03:58:30PM +0200, Marco Elver wrote: > > On Wed, 13 May 2020 at 15:24, Peter Zijlstra wrote: > > > > Also, could not this compiler instrumentation live as a kernel specific > > > GCC-plugin instead of being part of GCC proper? Because in that case, > > > we'd have much better control over it. > > > > I'd like it if we could make it a GCC-plugin for GCC, but how? I don't > > see a way to affect TSAN instrumentation. FWIW Clang already has > > distinguish-volatile support (unreleased Clang 11). > > Ah, I figured not use the built-in TSAN at all, do a complete > replacement of the instrumentation with a plugin. AFAIU plugins are able > to emit instrumentation, but this isn't something I know a lot about. Interesting option. But it will likely not solve the no_sanitize and inlining problem, because those are deeply tied to the optimization pipelines.