From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1606C4361B for ; Wed, 16 Dec 2020 21:24:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93ABF22D2B for ; Wed, 16 Dec 2020 21:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726503AbgLPVYj (ORCPT ); Wed, 16 Dec 2020 16:24:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbgLPVYj (ORCPT ); Wed, 16 Dec 2020 16:24:39 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 406DCC06179C for ; Wed, 16 Dec 2020 13:23:59 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1608153837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CD16dqcpUQKgPHdjRPxV49zv42Pzi+VzliQWGRIcOig=; b=Ub79IKit15RTidyWUv8Baw+gzGr16YVFpOAJYNYJYpcP31+3cDwOqhsw2K627j1h9eB4GR AijKH7ZN66d2Zzx8uV9BadaibM/uFX7h3nuF+HgQJsnF1iD7OjDEbHlIK+uRpYlSdAPzBX uC6A2CTZqgNASCcsi/+yeANejrFr0M41QNqile2Ic/UTkSlCGHVro15P7pUnujEikTznmj b1UhWNffTZSZOTPtOOhdmFeZUr4OHbGmcHpRA5dxaq2m3jJ/6Jhd0VWpFek0jGwpyNvi/U 7wEfnRWgeV9H93Iz8COTQN/WTZY165A8nA8MAwnZUQJvzF1+y9UoI394lDK4Iw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1608153837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CD16dqcpUQKgPHdjRPxV49zv42Pzi+VzliQWGRIcOig=; b=CkPhA/jVIBdYmM5JCZCqTEyofHJZe/vHpvWQqgv/pPq7LCxUf6w9v42sFICL2cEcoKJJTW kjpWYIgfWRuhqrDA== To: paulmck@kernel.org Cc: Peter Zijlstra , 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 In-Reply-To: <20201216211931.GL2657@paulmck-ThinkPad-P72> 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> Date: Wed, 16 Dec 2020 22:23:57 +0100 Message-ID: <87czz9savm.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 16 2020 at 13:19, Paul E. McKenney wrote: > On Wed, Dec 16, 2020 at 01:27:43AM +0100, Thomas Gleixner wrote: >> So my intent was to document that this code does not care about anything >> else than what I'd consider to be plain compiler bugs. >> >> My conclusion might be wrong as usual :) > > 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(). Could this be spelled out somewhere in Documentation/ please? Thanks, tglx