Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4029783ybl; Mon, 3 Feb 2020 11:09:57 -0800 (PST) X-Google-Smtp-Source: APXvYqz1V+YXqhr5GFPv3qWcPd+9q0BHhok5YmI/Tzh2o9ummqohe2QExS6+C5ysmruNb+gA/ElW X-Received: by 2002:aca:c70b:: with SMTP id x11mr380775oif.29.1580756997122; Mon, 03 Feb 2020 11:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580756997; cv=none; d=google.com; s=arc-20160816; b=Rntof8OCVvL2KxVlKb2aMk51B98eMmz3foXgVg5geRi9WmICXwS55vv3YvqOkX9dif cdIbed1mGTM9SHs6Dktn8aMAFOZB1bqhyI8BPQMK8dJA3Gn5gS63xYpskXUEBn3QjAal dgWViYOArcSBQC0mWsMJa6ngDy8QgX2HtiABqeTJ2t9WCDD/Y6EfRXBoe5jUuhWoVm45 Hgx53s3/Iga/LKeUlx+bkv6Pjqq+UoHhv5cFQj4KmhjNih3gp0dUAsrkJLiSi35X5nY2 kFgvhRMuqW2W411aRoQQFNIIT3GoYvZIMG4yoFPB8enIT8bvDCZg5Fm+ZEQUP8hVxCt6 LT9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=O3LXyAbwKPAII6p2zYxZT1TK5FCbInGSy0vdn7jbvSo=; b=FoD2PgD+MThXizUZ3jyxPecaBVKdy9D7La3btJzS9fEXYPV6oVKKP85hCVcimmptlf EEbtjHhCCMwpsmkxFW1fFBT4iY3WjcdsN5fLjBtU8UJM3Qjj9gAMA+BBYFRxTslsjSj3 Aw+MR2Kah90VE+SNuM5L/gcJESn9HpzV674m/Cgqm1GBQ09qHR8FuhNHX8ZSAuYy4ZQC RrQlWMzrZuZRi5F5lhruVau+wwfPKRrKsB6E7jcjves4tbvlAZ21/sUs3hXyqezGgni8 C2qX7lkR/UYdhzTIxKeGcA+5XR6Eqo2Zr+0u1g1jL3K2BQRfQv5m7vJZ1RuuYNXEgMS4 vmlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ox6TelB7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id h8si8351871oib.104.2020.02.03.11.09.24; Mon, 03 Feb 2020 11:09:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ox6TelB7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727747AbgBCRZz (ORCPT + 98 others); Mon, 3 Feb 2020 12:25:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:48106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727150AbgBCRZz (ORCPT ); Mon, 3 Feb 2020 12:25:55 -0500 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3839F21D7E; Mon, 3 Feb 2020 17:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580750754; bh=U+WFdDMs2py+jrUgPw25TAgQh0Oc93Yfllr/9P1q1zw=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Ox6TelB70UeTlYdxY9Fp+JnDQczAzGzoRebrj0xmq/1MDdHIlSeZ5I5X+OpvvRuAU p3/Kc94bDNvU3RcYBaDCRm+gHpLaVC3A8Tklwn8R7Re2Tl4oUsvILslUOWwmvW52DI 9uTvwy3UwgEFmRjtbAzk3ecodIfQWgnpHd6+UfUQ= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 0B1EE3522718; Mon, 3 Feb 2020 09:25:54 -0800 (PST) Date: Mon, 3 Feb 2020 09:25:54 -0800 From: "Paul E. McKenney" To: David Laight Cc: 'Marco Elver' , Eric Dumazet , Peter Zijlstra , Will Deacon , Thomas Gleixner , the arch/x86 maintainers , LKML Subject: Re: Confused about hlist_unhashed_lockless() Message-ID: <20200203172554.GL2935@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200131164308.GA5175@willie-the-truck> <20200131184322.GA11457@worktop.programming.kicks-ass.net> <26258e70c35e4c108173a27317e64a0b@AcuMS.aculab.com> <154c51cc385544789c9fa0b233fc76e7@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <154c51cc385544789c9fa0b233fc76e7@AcuMS.aculab.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 03, 2020 at 04:05:25PM +0000, David Laight wrote: > From: Marco Elver > > Sent: 03 February 2020 15:55 > > > > On Mon, 3 Feb 2020 at 16:45, David Laight wrote: > > > > > > From: Eric Dumazet > > > > Sent: 31 January 2020 18:53 > > > > > > > > On Fri, Jan 31, 2020 at 10:48 AM Eric Dumazet wrote: > > > > > > > > > > > > > > This is nice, now with have data_race() > > > > > > > > > > Remember these patches were sent 2 months ago, at a time we were > > > > > trying to sort out things. > > > > > > > > > > data_race() was merged a few days ago. > > > > > > > > Well, actually data_race() is not there yet anyway. > > > > > > Shouldn't it be NO_DATA_RACE() ?? > > > > Various options were considered, and based on feedback from Linus, > > decided 'data_race(..)' is the best option: > > https://lore.kernel.org/linux-fsdevel/CAHk- > > =wg5CkOEF8DTez1Qu0XTEFw_oHhxN98bDnFqbY7HL5AB2g@mail.gmail.com/ > > > > It's meant to be as unobtrusive as possible, and an all-caps macro was > > ruled out. > > Except that it then looks like something that actually does something. > > > Second, the "NO_" prefix would be incorrect, since it'd be the > > opposite of what it is. The macro is meant to document and mark a > > deliberate data race. > > It should be IGNORE_DATA_RACE() then. People will get used to the name more quickly than they will get used to typing the extra seven characters. Here is the current comment header: /* * data_race(): macro to document that accesses in an expression may conflict with * other concurrent accesses resulting in data races, but the resulting * behaviour is deemed safe regardless. * * This macro *does not* affect normal code generation, but is a hint to tooling * that data races here should be ignored. */ I will be converting this to docbook form. In addition, in the KCSAN documentation: * KCSAN understands the ``data_race(expr)`` annotation, which tells KCSAN that any data races due to accesses in ``expr`` should be ignored and resulting behaviour when encountering a data race is deemed safe. Fair enough? Thanx, Paul