Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp527446lqt; Thu, 6 Jun 2024 10:12:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/2WHF0B3jJsDu9CMGDI2uCG35IAXBU2RQAZYPKC6287ai+v5AD56ncXGrRrhk118PR3OpLIR85/XyThzVIXi0qZzFHIUByLAIEgA7RQ== X-Google-Smtp-Source: AGHT+IHF7wjEAnc0KPqwtjaFTaNcJttHmFOtP/XoQUQ1VP25Hc3p0d5T+tpq2Xzb8DWDkfwUiFk4 X-Received: by 2002:a17:902:e808:b0:1f5:e635:21ef with SMTP id d9443c01a7336-1f6d02c73b4mr3310315ad.3.1717693966990; Thu, 06 Jun 2024 10:12:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717693966; cv=pass; d=google.com; s=arc-20160816; b=gev8d15fzeLu4g1gTbhkWVD9e+gspYP8kd974fQJnYrwvZO9fsyqWkpTwLoRx7IjrN T76M2oB+DYwZh2icEvBWLETJmDQ4TwdIeN3tLqWpVFhfA9+DtuAfCF211OeQgyY8r7gq 3DDY9g3l7zBUqUPN2Crm5eb3CzzIIPn+ZRdaRmLlzsmiEl86TMrh+pzto5UsRz3nXddE RImbUBgxebFCNduxZ5o3Drfa5RcDM3csNtD2WAm4NoYJtbmNxBuNC2bxPa7m/EKw3cix 3yoiSKzwuygrE78c/hSdnJ/aC9uZiyVcZyreYZ9rAb8DIfZmMPeFt1UsbD5fk+pYzbt+ 4Exg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=/RCRnhy0SQ+MR738lGKcNKOMwvhlSIYknp/OB3AbX7c=; fh=/NYPyLie2IGYOgFuw4YcrJtP9K8xOQi6Tf9Cf9c3Y8Q=; b=kudD/kMx6bTa9edq618hMtn4kLyUhQ2cv6Rwf/Fgj/pVVUUYrPsB7pAROBOmNoEr8A np82Gk/kTXeSB0HsJDKZtK05zWI4KCy6/1PVA7Yp8J06F1/ifmULwoVjNKppLYWpQaZL F2+zuCowGLpZd5cF75cgQ2ELJ9Talla/A3vW+wXOxGtOfkJsifugr/ccPx//ZS5Xzuno pOkwlJrJZIr50ImUZEfhI7XcI0eNuxkl0HQ4ajx1pSWZZoSGsh/qRJ7r6hFSo65LoBVG uokiQAW/pJ1kzXng9v1Tb0dmuuDzPog+XUoVcJMj8wK0Y6LHlXPfOBUnqDGcBFPFK9Lo YsZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gyY9mGf7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204746-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd7608e3si14511595ad.25.2024.06.06.10.12.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 10:12:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gyY9mGf7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204746-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6E7A6291DF7 for ; Thu, 6 Jun 2024 16:56:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E094198A31; Thu, 6 Jun 2024 16:56:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gyY9mGf7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 855DA224D1 for ; Thu, 6 Jun 2024 16:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717693002; cv=none; b=DRpxN0Gr96NtXd3YnidKuPT5ZSaWu2vUExZvnkksUOBK+MEtkzCc4myoq9JQuP1b4ZNzWyZPaeCVj4pQzzZDxbodGMUXulqRwyA49zJbM0LhzR4zEA9d2II/pB/jRv//KAb30ooTAAVGwfNJqFVf86c5xyAlL7bwIWuV2cKF2+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717693002; c=relaxed/simple; bh=TCjJrhdDbP5pQDHzS6TnuP2QNA9JBdFuTM3jg2PHGtQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qR6/yOnZPrpEUoPKOvKnkvu6z0dERTOIKv+hiXd1HiK20MNB09Cib2Xawa37f0jyzuyeGgwJtxDffwk/FTn9gPe1W39TSKDYfxCqiKNrkTif2x/OBSBIQy0kB63zF3qHn4Ap2y0lOZPvPjTZAVK/b2rUbxjb527kppJoDWNeEPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gyY9mGf7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC8B4C2BD10; Thu, 6 Jun 2024 16:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717693002; bh=TCjJrhdDbP5pQDHzS6TnuP2QNA9JBdFuTM3jg2PHGtQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=gyY9mGf7PDfODP3laEIzQ2SH4QNWgKxcBQiJ2AQ4riaJj3NY0I3thQKnJpgEPDZZq stAzpuRxUnV+orAX5zrPGnJq00jbOaBiPP6MS4sbAKV6tqszoObRN3Pjy4KSeStCX0 3dCHA//hj3lTh+drdp9Ei5PdU/3gRqk5AE+fsJRjL6sn1yToUahjUuQcNJDxq6o+YF O6waygYVvFkSN5ww9prTik3hZ1X/un+6zjkO1a2GRZH4A+hFkJJdZxgLdr5+g0Er+y SSxgeqN3POmLYVwqbHfvuPmk9HITNVDBNavfU8pJmfopAAux8BhX14licdWVG2DSFh 1ShU7yz1oR7yA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 8F96CCE3F34; Thu, 6 Jun 2024 09:56:41 -0700 (PDT) Date: Thu, 6 Jun 2024 09:56:41 -0700 From: "Paul E. McKenney" To: Andrea Parri Cc: Alan Stern , 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, dlustig@nvidia.com, joel@joelfernandes.org, linux-kernel@vger.kernel.org, hernan.poncedeleon@huaweicloud.com, jonas.oberhauser@huaweicloud.com Subject: Re: [PATCH 2/2] tools/memory-model: Code reorganization in lock.cat Message-ID: <4e02f72f-f901-4734-ba3d-6a0663915107@paulmck-laptop> Reply-To: paulmck@kernel.org References: <6211154e-7db9-4129-b0d4-26ff69e2398c@rowland.harvard.edu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jun 06, 2024 at 06:16:27PM +0200, Andrea Parri wrote: > (... Reorganize code in lock.cat) > > On Thu, Jun 06, 2024 at 09:59:01AM -0400, Alan Stern wrote: > > Code reorganization for the lock.cat file in tools/memory-model: > > > > Improve the efficiency by ruling out right at the start RU events > > (spin_is_locked() calls that return False) inside a critical section > > for the same lock. > > > > Improve the organization of the code for handling LF and RU events by > > pulling the definitions of the pair-to-relation macro out from two > > different complicated compound expressions, using a single standalone > > definition instead. > > > > Rewrite the calculations of the rf relation for LF and RU events, for > > greater clarity. > > > > Signed-off-by: Alan Stern > > Tested-by: Andrea Parri > Acked-by: Andrea Parri I queued them both, and thank you both! Thanx, Paul