Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1364829ybk; Thu, 14 May 2020 07:15:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrneMze547QXskwh2OP23hZL4ysFmMSUEC9FlQpQEpKLAytDFX1dvrnoZbA41Tst7SpKpL X-Received: by 2002:a17:906:7717:: with SMTP id q23mr4237801ejm.38.1589465737816; Thu, 14 May 2020 07:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589465737; cv=none; d=google.com; s=arc-20160816; b=EZPpAuYx8MjClkTKZarB/+vDVSeUDhUzzc17HNdF1k7SIiNngciX5WKOlZd1t7B//l 3fUm+KJatPKGwop+uCbIOHTwvtb8LetlNWExL0u620m33ASv/Da+WtVBz+PPD7sWRnA5 KqaGR2cqB+p95KIQIl8SHc8aa2RQdnwPsf2/tAvGnUxniD3LgKHrltM3p9Mv26LZdDKp 1Ad3DhvallaxzZc3QSDoqpA/IFVySYb3vqVTvvdeVSxLMSQ8AkrhGPMKLTpd4W0vYTYd d4kAG2SQKYh5of16AgBZUAEMyZNd+V7ZHKcyZSP9/V9kI+xmkUpf91kRcBUvSRplhItH FziQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=24DpN9zNO9oQkKgQN/LTrZSM6weAKUr94T8Nr9pkRko=; b=lPI/kbsZFPBCv77Y8MSqDGufA41O3VTJTQjB7ZT50RtQrazsiJXaMOzljCuitFthTj OkOYwxisf0lJnC0U075oKTI1woAtCKBZnC+g23vvziTX9b8zfJfxvemHVRZoaR7mnOgC l7ghGQyfVpOvxkp+clODnZ5bQrkmLHF4X+5dawlLM0m7ITPkIFnZU63xvq185btovYr6 QQ0DwopDk1q/OvBFxo5rn1G++i6q8RtPLCCxNNQ8ZwRacRpZS/GTg0k+TsVId1KOT/kg Boz92cy2FtAnzP/hQXrzDv9a0AOiHeVoqzQhxsC7uYGh8rNveS/ZE0zNIL42j2TVU0hw bCgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=G+TRj94C; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q23si1640444eds.325.2020.05.14.07.15.14; Thu, 14 May 2020 07:15:37 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=G+TRj94C; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbgENONx (ORCPT + 99 others); Thu, 14 May 2020 10:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726128AbgENONx (ORCPT ); Thu, 14 May 2020 10:13:53 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43318C061A0C for ; Thu, 14 May 2020 07:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=24DpN9zNO9oQkKgQN/LTrZSM6weAKUr94T8Nr9pkRko=; b=G+TRj94C7NwDSva0dqVIEmncc4 Sl/U3vVasaBDWzTVfLHIAoe5PFcF6z57yuCCn9daZKiAdsgiRC5ZDn4KhDPUHMR3cz3csZ+Aii3b4 Oeo3MhZHt2KbyvTh8sMDzVEPJKUuxv8eXLGWsnnYk439hqHguZSxAB695mlmlzI6SzoBV/NgMKIUW P8goBUMM6J1G5L8URDNqoCDTGuDUX+aHaVUInaFO2KZsQW42CB01ly9mgrwqEwsj88cDexTzs2ggV AC9Ft+tFas0gMBLTXm6rc+1+b6nn7CilvFAvRdNYL9clr9i+r2DEFOWD38HtEsBq8KegS9QsGS6Vt ExtLQ8+Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZEcM-0000AE-Nl; Thu, 14 May 2020 14:13:46 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 01967301A66; Thu, 14 May 2020 16:13:44 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DB9382B852D45; Thu, 14 May 2020 16:13:44 +0200 (CEST) Date: Thu, 14 May 2020 16:13:44 +0200 From: Peter Zijlstra To: Marco Elver Cc: Will Deacon , LKML , Thomas Gleixner , "Paul E. McKenney" , Ingo Molnar , Dmitry Vyukov Subject: Re: [PATCH v5 00/18] Rework READ_ONCE() to improve codegen Message-ID: <20200514141344.GB2978@hirez.programming.kicks-ass.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.