Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1123993pxu; Thu, 17 Dec 2020 02:50:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyB9zhG8tDp3F6UEBUoideRK8gZfqIY7FSVhqhtdyxnN7U3v7mnYcfgdd7mxWFmbxIEpDMu X-Received: by 2002:a17:906:834a:: with SMTP id b10mr34427819ejy.125.1608202216036; Thu, 17 Dec 2020 02:50:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608202216; cv=none; d=google.com; s=arc-20160816; b=elH2qnnLDw4bvlbNdf0Z2Ig1s+m0HB3451Ow4FMoBBXst+h73PXWmOIW9mhk3QDedd wMgnyg8b1+ToPfry/lMKtVuFzYgVPH5bx2unEkrNY7WLNo5lg3NN0uuyImKc8N3K336J 2BbpGT3FE1AoDk9OZwdNuFdwUfaFhZCXvgusgY91xtYN5Gjw+zuKAe0y084FYtMJr0xm 92gSbRXIE6RztMuDPEVcPpNRntZKOnRs47EIu4hswzS7OODP1YFpmpwIS6l7920/o7tK ZjLEjDrEHQ50dlGjHYli2iVAm7plvLd7pHOqIMQ1dpFdW6T82L5PO+J6XuEyFjs9gb0G kprA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gjyTgh1UagQyigQH76YaZvKk8RwMBB2TgkJohxIQuyM=; b=xe5cMRozMoP3SXJVD3rGaqphvNmZRUZgWwTeDSEl2+0saKnc3KROmK7mCsOstO3GdY 5xsfatDnIDVrl9Nq83e6RKpnCyUx19S0m2b7BV5s1bFp+8iPE6KjKLqHK2dmJXsaeCVQ rH89onwgaDJ1H+ZbKOTtGM6RMIJPVNU1BcvioyFMbWvggwZx52MBaFT1udwPPq2K9ZZi JZynfwvgJSSiqRPvdCiJTfoEzbgBPj2y/TD6nzp7Y67QPdLJt2BoiYG2v26IIfc6oeRy mCosanKei/0+pgPN0u71sp+QtKGbG26C+UNIAXwlT1yuCgBuyePBrWHxbFLeFWZ5cxms zVBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=l9KCtMAy; 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 z23si4483029edl.270.2020.12.17.02.49.53; Thu, 17 Dec 2020 02:50:16 -0800 (PST) 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=@infradead.org header.s=merlin.20170209 header.b=l9KCtMAy; 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 S1726631AbgLQKtN (ORCPT + 99 others); Thu, 17 Dec 2020 05:49:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbgLQKtN (ORCPT ); Thu, 17 Dec 2020 05:49:13 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4A98C061794 for ; Thu, 17 Dec 2020 02:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=gjyTgh1UagQyigQH76YaZvKk8RwMBB2TgkJohxIQuyM=; b=l9KCtMAy5kxRoMpWLeg9XlIe+E omw46H1JH2Jz//PSHgGwA4XA8O0CInyPUP5XIow6pn/Dh2EAP8ZFpaQAWmb3aZ/ugpJXumLazxycG qzuIQPhlZPuZuHIKzrF2Q6qpqV6Fa6O0nI8hi63/EvSL6yvg+PPl11c4/cX91lU6JfAy71vwtwRrb Qa205lZoSMctNZI36yCM4ksw9Vymkh/C+JhkLSmWPe2cbVipN3SUo+DEgyWvmZqh/mHw/B29awQk4 uWw8HAWPSJopy8dFcrhMC23mmSjCKr/vNkYqFb/+zAiOS9lM52g+v7AvvznLo2QYvHzb3OFE8bi9a 7Ic2VsZw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpqpc-0003jS-TP; Thu, 17 Dec 2020 10:48:25 +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 6250B300446; Thu, 17 Dec 2020 11:48:23 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 44297202395BD; Thu, 17 Dec 2020 11:48:23 +0100 (CET) Date: Thu, 17 Dec 2020 11:48:23 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Thomas Gleixner , Marco Elver , LKML , kasan-dev , Ingo Molnar , Frederic Weisbecker , Will Deacon , Naresh Kamboju , syzbot+23a256029191772c2f02@syzkaller.appspotmail.com, syzbot+56078ac0b9071335a745@syzkaller.appspotmail.com, syzbot+867130cb240c41f15164@syzkaller.appspotmail.com Subject: Re: [patch 3/3] tick: Annotate tick_do_timer_cpu data races Message-ID: <20201217104823.GU3040@hirez.programming.kicks-ass.net> References: <20201206211253.919834182@linutronix.de> <20201206212002.876987748@linutronix.de> <20201207120943.GS3021@hirez.programming.kicks-ass.net> <87y2i94igo.fsf@nanos.tec.linutronix.de> <20201207194406.GK2657@paulmck-ThinkPad-P72> <20201208081129.GQ2414@hirez.programming.kicks-ass.net> <20201208150309.GP2657@paulmck-ThinkPad-P72> <873606tx1c.fsf@nanos.tec.linutronix.de> <20201216211931.GL2657@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201216211931.GL2657@paulmck-ThinkPad-P72> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 16, 2020 at 01:19:31PM -0800, Paul E. McKenney wrote: > Given that there is no optimization potential, then the main reason to use > data_race() instead of *_ONCE() is to prevent KCSAN from considering the > accesses when looking for data races. But that is mostly for debugging > accesses, in cases when these accesses are not really part of the > concurrent algorithm. > > So if I understand the situation correctly, I would be using *ONCE(). Huh, what, why? The code doesn't need READ_ONCE(), it merely wants to tell kasan that the race it observes is fine and as to please shut up. IOW data_race() is accurate and right.