Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2291588ybv; Fri, 14 Feb 2020 15:40:22 -0800 (PST) X-Google-Smtp-Source: APXvYqzxvEVPt+vgbnSS0r+VDxBDVSlg2+I3VJWfy5m37DU/12ZcVo0t2vRiYrmYhMvcBE1GOJy1 X-Received: by 2002:a05:6830:1555:: with SMTP id l21mr3988853otp.41.1581723621883; Fri, 14 Feb 2020 15:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581723621; cv=none; d=google.com; s=arc-20160816; b=YvFZkrZaXX+mbZFFsHynAVzE1oJkZBEMuegD+LQux+9qdpgz0Pub1PPfQd4hoEiPMO ImT1ZGY6GEFXnHCRcjEChKBQ/F4NwiBKW+yxm1+bcotyqPJFtBNNGrG75sX+U5wDAGjp FNi6JqF0qzz0twQ+0ARlN4dCA5ahGt/g27ADrlMTYB7cRjeym8LoYEh+edx1oze01yGm NHs2gkJz2WTSnt5l3pM1lW59SsFE9YFel2WSjQoMFmxI3bcGuS47OphWHMuW+BxuZoDp 9yWv43isxE1fW4hLF+3KnHU9R4tKulS+i7URJOA/vjAxKHeQzoepd4VSdfupEwZmbucF g6wQ== 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=hoAgCZmN1XpQfzhP7Qb2SDiMGckSqZQxEo33rnXwsdw=; b=UKDv0aEzODDY78KXnRLZC+joxfVzqSFHLETMEKGLXqRoJAE+PwAYgZWkpRqswwGRKV LRs7DQk3EkmZbROL0i9MVy9xZF7HEpnZBfoH8dwfvORGt2SJSs8cdJxfdiJCxW54p0G+ pVNNqBCTVV+qZKxd/bY2CRqERgD3Dg0G/bxuXd/uGAEN4TaPRp74Up1cS5ruKV6xOzmB n2SW2DCV9b2x548emnNkeobqmaT8tNi5Z+pKnC89YcRINwm17CIgIF3PhTHbz2btu6hL tALSF+vuQHvM1b81t5iErYph5yF6sZgYGT19cyh/Ga9OTHuXNPDyIgQHIcE9HPpkkhEX aP/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GiyfG6xC; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si3635021otq.298.2020.02.14.15.40.08; Fri, 14 Feb 2020 15:40:21 -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=@gmail.com header.s=20161025 header.b=GiyfG6xC; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728520AbgBNXjh (ORCPT + 99 others); Fri, 14 Feb 2020 18:39:37 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:41088 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728508AbgBNXjg (ORCPT ); Fri, 14 Feb 2020 18:39:36 -0500 Received: by mail-qt1-f194.google.com with SMTP id l21so8129944qtr.8; Fri, 14 Feb 2020 15:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hoAgCZmN1XpQfzhP7Qb2SDiMGckSqZQxEo33rnXwsdw=; b=GiyfG6xCNJtKMIsMrJ0JETDXBBAyOPTCbu/OraMznyUx6FTbJL+P5TOaGb7l8oGWQI SXSFn7JcHaSQ+vy8eBzE4Mk1XvnK5pyxO8EhfqvyDtxqihB62wMHfVyjlvTk5MVx8bnY EX6Jj55YMmfZXjLqb5KrFLzySRLvkr9LEVTIWpaePjmwccaAjQrH7IW8DU7MBSbSP++J dC79e6C+6QcDHEsLoyYbxOBvy7eaYgtHwbzWsfAuD3K2SjMp6CMepOigSXJ0B3NvuwdK xYvr/IsSW2s26mQHEC/nhHB/fY21FhfJpwjQGNROMOhHeuO7ZXDzllp0GSVRfiZHacO1 oMQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hoAgCZmN1XpQfzhP7Qb2SDiMGckSqZQxEo33rnXwsdw=; b=ozlqRrbo+kXz6ktM8AfcqR5uv359gfhI3Fvc0fx7Y3lRDToe3ytdu9jyCPZcv2uNJG +8MBJAYoSuYWtXVN4w8kKcYoOg0yHwB4wD76w/mJm7/OgHeN2KNaYEavHvIxLG3oGlUn 4N+5rhmmif4SVzSIzxkkdwyDFoXG6oSlk76ybTFSIdhbxLCaV3tGbr5M7/wv2xNPQUre unuqxhIy0c4XoOBcSqvTNkOT+GXRhmHTcyfbg1QF3GHAyOrX7NbHL1nNbMYvmvm9WEkk wMgxasaRbTOQ0W6QnktuDXyILjH2S7NoWS60KW/Gp3rrJ7UpwNQ79+1vNNPvBFEAInC8 lB1A== X-Gm-Message-State: APjAAAV8vYX0g0JfaBZ0Mdr79JKjn3S5rkpmNavXPzYGDDaLgcrKguzk atkGdUt1SoE9J8wfOXJD0ao= X-Received: by 2002:ac8:7309:: with SMTP id x9mr4693926qto.338.1581723575009; Fri, 14 Feb 2020 15:39:35 -0800 (PST) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id o55sm4442553qtf.46.2020.02.14.15.39.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2020 15:39:34 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 7471121B62; Fri, 14 Feb 2020 18:39:33 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 14 Feb 2020 18:39:33 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjedugdduudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhunhcu hfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucffohhmrghinh epkhgvrhhnvghlrdhorhhgnecukfhppeehvddrudehhedrudduuddrjedunecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsghoqhhunhdomhgvsh hmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedtieegqddujeejkeehheeh vddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfhhigihmvgdrnhgrmhgv X-ME-Proxy: Received: from localhost (unknown [52.155.111.71]) by mail.messagingengine.com (Postfix) with ESMTPA id D4D7A30606E9; Fri, 14 Feb 2020 18:39:22 -0500 (EST) Date: Sat, 15 Feb 2020 07:39:21 +0800 From: Boqun Feng To: Alan Stern Cc: linux-kernel@vger.kernel.org, Andrea Parri , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Jonathan Corbet , linux-arch@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [RFC 0/3] tools/memory-model: Add litmus tests for atomic APIs Message-ID: <20200214233921.GA110915@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net> References: <20200214040132.91934-1-boqun.feng@gmail.com> 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 Fri, Feb 14, 2020 at 10:27:44AM -0500, Alan Stern wrote: > On Fri, 14 Feb 2020, Boqun Feng wrote: > > > A recent discussion raises up the requirement for having test cases for > > atomic APIs: > > > > https://lore.kernel.org/lkml/20200213085849.GL14897@hirez.programming.kicks-ass.net/ > > > > , and since we already have a way to generate a test module from a > > litmus test with klitmus[1]. It makes sense that we add more litmus > > tests for atomic APIs into memory-model. > > It might be worth discussing this point a little more fully. The I'm open to any suggestion, and ... > set of tests in tools/memory-model/litmus-tests/ is deliberately rather > limited. Paul has a vastly more expansive set of litmus tests in a I'm OK if we want to limit the number of litmus tests in tools/memory-model/litmus-tests directory. But ... > GitHub repository, and I am doubtful about how many new tests we want > to keep in the kernel source. > I think we all agree we want to use litmus tests as much as possbile for discussing locking/parallel programming/memory model related problems, right? This is benefical for both kernel and the herd tool, as they can improve each other. Atomic APIs (perhaps even {READ,WRITE}_ONCE(), smp_load_acquire() and smp_store_release()) have been longing for some more concrete examples as a complement for the semantics description in the docs, so that people can check their understandings. Further, with the help of klitmus, the litmus tests can be a useful tool for testing if a new arch support is added to kernel. That's why I plan to add litmus tests into kernel source. Thoughts? Regards, Boqun > Perhaps it makes sense to have tests corresponding to all the examples > in Documentation/, perhaps not. How do people feel about this? > > Alan >