Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2754049pxu; Mon, 7 Dec 2020 15:00:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcIOiRc5uweG3S8atAATgZWZIYu7L0KNkPDXeDw+UE0pFLYsd0voGXOJ77U5lZ6GlGWvdS X-Received: by 2002:a17:907:94c6:: with SMTP id dn6mr21067847ejc.13.1607382041713; Mon, 07 Dec 2020 15:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607382041; cv=none; d=google.com; s=arc-20160816; b=eLvQ0PHlLQ339IH2qEgqniKQ4DKaaimhcCxaeFoP+Iwvu6y8VPXSKARxz1ITq47FwC 2vyIp1kVXJ6qMV1rdCca6Qk5+wb4PmluGzNtduaSj62eqN4byCB0VDSL4pkgrEPHMt+5 jzmW5o57PCVRzYZ1UQ+tY3pQBSrz+fBNwB/+9pLGfKnamBpG8z9xOxpO9z9B6iC4l0cH 3HK8kD1cTp6XFVhYFGHschjyKqTVQpKrMYsieRY7X7x9Jc5Qu3vIdCc2D0TMcpSG8iDu Ot1NRgygvXtJiKRfsE4NzkRKZ3iKydp2PJDgeHL7hQkY/uQFU5o7SbvDP7HKhX1oYSub /kDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from :dkim-signature:date; bh=q5M5M04DlhaxB6oIqV3NhZr666HtPW8APzFV0hPj5As=; b=f6JXhu8EFfhDI1uTiBpFFuyoXwJzvLo6sgP5rslqESxSAbDIsGFv97CtxYRqsB3oUt UsZZ7Tqpo3JCFhFSPI+uUIvKUA6s8iKrOV0uonh5XnYGr8FyPAYFcpjQePzhvzeQ8zVh aAJ1G59XdeC2vW70XzM0HYfWX1xv8vx9HykjVH93loQMHFnd0Rq6tb7SypBZMv38E7iv mnyDVXN089rbHWmDfFqCKAtyRh4+Xbt7wCmS6uUf/iPMn4+pgxAgSQNzxJWhUJpKnA5R /hgJA0/5Wy2CTyI2nF4LXsmgvI2IvTAsj/fdqJ5Hc4HAVJn/ak+g3NSNvaDquV5tXoWO 0U1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HzKGZEMu; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lm18si5253308ejb.160.2020.12.07.15.00.18; Mon, 07 Dec 2020 15:00:41 -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=@kernel.org header.s=k20201202 header.b=HzKGZEMu; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725969AbgLGW4X (ORCPT + 99 others); Mon, 7 Dec 2020 17:56:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:47582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgLGW4W (ORCPT ); Mon, 7 Dec 2020 17:56:22 -0500 Date: Mon, 7 Dec 2020 14:55:42 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607381742; bh=MTovbSNum3TKJoGnhB5Nq3ImaKuoaau0JkrY19YWFUc=; h=From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=HzKGZEMulkSmll0/GZq/AdfLDIFFXu0jWuGNZFuyPNxYs1R//yvVMnKlO/5mwZKjs /ZAbDlwKvwO/wiiB4Ul4qbKWGpOSm1pXf8YuzkYl33ng+3l34VseCKXHdxV1jMmFsH HLgYil+3DkGusl593ZglXIa53KUF2SSFBBC6pTT0tx0bTjgIGy+PSMnKTCCOqXcExz 7Enr7HlVZDTCrOR46Pzvd7VNv6Y8vupv2Y7AKAbdVoiP1BYwRAKkirVH91HhBR11TV DPjHTdMgAXAHVKWWYJVj3fcC23WefrjIoP1RPCIPi6xFjIThc5AWpF5anO/tL30xwU 4Vki12++ZYnFw== From: "Paul E. McKenney" To: Thomas Gleixner Cc: Marco Elver , Peter Zijlstra , 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: <20201207225542.GM2657@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org 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> <87blf547d2.fsf@nanos.tec.linutronix.de> <20201207223853.GL2657@paulmck-ThinkPad-P72> <878sa944kn.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878sa944kn.fsf@nanos.tec.linutronix.de> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 07, 2020 at 11:46:48PM +0100, Thomas Gleixner wrote: > On Mon, Dec 07 2020 at 14:38, Paul E. McKenney wrote: > > > On Mon, Dec 07, 2020 at 10:46:33PM +0100, Thomas Gleixner wrote: > >> On Mon, Dec 07 2020 at 11:44, Paul E. McKenney wrote: > >> > On Mon, Dec 07, 2020 at 07:19:51PM +0100, Marco Elver wrote: > >> >> On Mon, 7 Dec 2020 at 18:46, Thomas Gleixner wrote: > >> >> I currently don't know what the rule for Peter's preferred variant > >> >> would be, without running the risk of some accidentally data_race()'d > >> >> accesses. > >> >> > >> >> Thoughts? > >> > > >> > I am also concerned about inadvertently covering code with data_race(). > >> > > >> > Also, in this particular case, why data_race() rather than READ_ONCE()? > >> > Do we really expect the compiler to be able to optimize this case > >> > significantly without READ_ONCE()? > >> > >> That was your suggestion a week or so ago :) > > > > You expected my suggestion to change? ;-) > > Your suggestion was data_race() IIRC but I might have lost track in that > conversation. OK, I am inconsistent after all. I would have suggested READ_ONCE() given no difference between them, so it is probably best to assume that there is (or at least was) a good reason for data_race() instead of READ_ONCE(). Couldn't tell you what it might be, though. :-/ Thanx, Paul