From patchwork Tue Mar 21 01:05:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 72590 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1528568wrt; Mon, 20 Mar 2023 18:21:44 -0700 (PDT) X-Google-Smtp-Source: AK7set/mCbrj4OpRPbMwlBzFMGTCKw1oWUigIME8dPhQ8492ohIOFq5uadNzyO6uqbQ5IaBFVLrL X-Received: by 2002:a17:903:41cf:b0:19f:1c79:8b21 with SMTP id u15-20020a17090341cf00b0019f1c798b21mr456560ple.42.1679361703958; Mon, 20 Mar 2023 18:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679361703; cv=none; d=google.com; s=arc-20160816; b=M474jRcq2kCgKb2Ij+w2Uu/jEZeniwLpgrJxn7IwR592040oRm2FimxVIvtrrSdbtH WksKMBFsBn7BJ3SrdlggsAvBs1Y+1UJ1ieADuJLwhNmFoGQSUAcegYm/R9NU/WHVX3pC bnkRfyiQRQbZEh9pmSG7U/egTbSwMosUhnAA1RrAeKVh0VWB+c3XM/C5TCAIy28mqVVd h4jiSw6JC8YE3ZrrOe5UcuC0kMd23Q6EaxF1w/lBCy2mpEfG7TZjrj0G2ZlSZrfnI+mk wS2kwLiDYIrjlMUQxpJKwHnr9ZLlSicVvVRP5hG72l+RxH/ixIXC+fNBSfpFNjIFnuBb FVtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Yp/bxVUDVKKqQCzt4iNfloheJcWYiCl01u6Th6XRkyA=; b=TfjXJ0gJleuA6reHFSP4UKikrsAC/p10cGtFk6K5wHwAILXVY+4WceZSDL6bV4qFg0 BpHfJBKJKOD4Stuk6L7WhoxaR7PmFUgZKa1agGuP5tNVJ9PplQS7XR6a0vJyNV3Qrcpz fKpQps6iTdO7rEMcy3xY/pZBn0Dzp2GcCxrx7Ge6/zgB8ZBEQ+M9PGT+w9pbBaongy8Z kS0qDXu0k9giaJtLO5VqADikOn3ZK8sVHE+bKO9M1xEBZTfbjelQhHIk2dYyUUyJUgpi krxCZmpY5aSGXixbZG2yuZ2MAvFPSm8Hv2kN1aa0qymO9MXN2rmN6IR0MRxy7fPLrkbb MNVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eqH28SQS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a170903230900b001a10c64c68csi12784023plh.113.2023.03.20.18.21.31; Mon, 20 Mar 2023 18:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eqH28SQS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230332AbjCUBI5 (ORCPT + 99 others); Mon, 20 Mar 2023 21:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230128AbjCUBIZ (ORCPT ); Mon, 20 Mar 2023 21:08:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7A6D37F35; Mon, 20 Mar 2023 18:07:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 85F7561924; Tue, 21 Mar 2023 01:05:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEE88C43325; Tue, 21 Mar 2023 01:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679360751; bh=lZo/BQz3UIZjSWUToPVQVl7BhO510z3+z/kZFOpr6Do=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eqH28SQSZKbpDOkcDXEuR9n9DoC9/lhPx6oY3OJ09y0e2EgLc8/8siVxIpq3z+066 DQhmvXe7CeSZ9kSGO70GgnF1dt+96TKc32kATHQQsev9T+NzG38vywHrh7LR9Ke0vi GbpUf9IJrR7AIumjRQL9zxqOZxincyBfcBWRrdmdUhovNMdWuYL2B0+Zsvn3Y8O7N0 PSL1xNt7rO7ViZfDs2jZKxTwWZH30BlGIP4sA1lTrac5eHavwsyA4XtrziyFs7AV+0 F+eWSFJnIpiaUECVdP8Yp3GTwQB0qc36u516f0YzFonUrsBTJ3sK/M/5C+btsu+Wv9 2El8nmZJsoSvA== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id E733315403D3; Mon, 20 Mar 2023 18:05:50 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, kernel-team@meta.com, mingo@kernel.org Cc: stern@rowland.harvard.edu, parri.andrea@gmail.com, will@kernel.org, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com, "Paul E. McKenney" Subject: [PATCH memory-model scripts 31/31] tools/memory-model: Document LKMM test procedure Date: Mon, 20 Mar 2023 18:05:49 -0700 Message-Id: <20230321010549.51296-31-paulmck@kernel.org> X-Mailer: git-send-email 2.40.0.rc2 In-Reply-To: <4e5839bb-e980-4931-a550-3548d025a32a@paulmck-laptop> References: <4e5839bb-e980-4931-a550-3548d025a32a@paulmck-laptop> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760938378515042115?= X-GMAIL-MSGID: =?utf-8?q?1760938378515042115?= This commit documents how to run the various scripts in order to test a potentially pervasive change to the memory model. Signed-off-by: Paul E. McKenney --- tools/memory-model/scripts/README | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tools/memory-model/scripts/README b/tools/memory-model/scripts/README index cc2c4e5be9ec..fb39bd0fd1b9 100644 --- a/tools/memory-model/scripts/README +++ b/tools/memory-model/scripts/README @@ -76,3 +76,35 @@ runlitmushist.sh README This file + +Testing a change to LKMM might go as follows: + + # Populate expected results without that change, and + # runs for about an hour on an 8-CPU x86 system: + scripts/initlitmushist.sh --timeout 10m --procs 10 + # Incorporate the change: + git am -s -3 /path/to/patch # Or whatever it takes. + + # Test the new version of LKMM as follows... + + # Runs in seconds, good smoke test: + scripts/checkalllitmus.sh + + # Compares results to those produced by initlitmushist.sh, + # and runs for about an hour on an 8-CPU x86 system: + scripts/checklitmushist.sh --timeout 10m --procs 10 + + # Checks results against Result tags, runs in minutes: + scripts/checkghlitmus.sh --timeout 10m --procs 10 + +The checkghlitmus.sh should not report errors in cases where the +checklitmushist.sh script did not also report a change. However, +this check is nevertheless valuable because it can find errors in the +original version of LKMM. Note however, that given the above procedure, +an error in the original LKMM version that is fixed by the patch will +be reported both as a mismatch by checklitmushist.sh and as an error +by checkghlitmus.sh. One exception to this rule of thumb is when the +test fails completely on the original version of LKMM and passes on the +new version. In this case, checklitmushist.sh will report a mismatch +and checkghlitmus.sh will report success. This happens when the change +to LKMM introduces a new primitive for which litmus tests already existed.