Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp782813lqb; Fri, 24 May 2024 13:04:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjmGGgctw+I1x0Qco/VkHO24KeoYv3at1Uex7Zpw2aTig4DDio2UaREqBWule2DyDdDzgBPP0GI0YvCgDeQyV6hHOmQtsAbtMQ7ZHRvw== X-Google-Smtp-Source: AGHT+IHf/mrC21HXOQp+U/VkV8VN4DxBCJQdcFH8n+AhFtQnmrhO9A5KML+JjCtZ+bmiDUqMyyQv X-Received: by 2002:a17:902:da92:b0:1f3:1f80:b3a6 with SMTP id d9443c01a7336-1f44873dba6mr37991645ad.26.1716581067642; Fri, 24 May 2024 13:04:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716581067; cv=pass; d=google.com; s=arc-20160816; b=WRna4aDm0XVJC8uyxF9SawMqHrM+JfPOVQvgRkJfRY6FI0XZ3IYu5NTl+bEazCxsva kUedVSwhg5bV02DNsIq7lXP5BMQGXiXndAoBy00eJQOPj5XnJJsMih2kOBpZtsYjl9+R y3ULSMAlcEToZqPHwT/qzYF9EWnFiNDxjZPSRzock6BpfR5xcbRstZdPeiRvnNwgfz3T 4BfyPPE1qYtsyT5Ece9kdyqKHuOwgUe7tPwRiFngnOy9Qnw8l7UKL6PxFvw7KWfxQ0B2 vKB0ly3ghE2kxJkcZFSLuYmsKIPZsEiuqLkNPaO40zzhuNgcU0WxpNxClBrN5JhT9xXR uQuA== 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:message-id:subject:cc :to:from:date; bh=PwSY8C3LndwsTLJi2vQYRREfZ0Y2f7wR+gRA4pJ2yTQ=; fh=whT3whL0/0FAvwqCmtO4yry5pVUddBhTkNU2KPPAJts=; b=G61fkAam4pUlMxl+cbFB0x9v7RhhmDPAxXHqks6xq7evN0ajYa23wR/wWJLk4C+iby hz910asVOogfub/SJGICLnCTiR4kLcHEUWTKNSUy94S6P+Ufor0hvpdxq9l93SfLmIdb /bHDvrrgNYEGCGMOpLchPIQAQHu1YBB1utXJ7PdyEqll6sbaGyaecOqxsNbvpL2Ak+E3 H6HIc0EhdmmGzyCy4ziQ7MNo8LRM1cdHBgjKRrg45J1bRkssFCxpJPKKz052SivaYX+r xL0LuwX2z8pQDIGm/sec4iCAGhTUIMgEliGV0ZgenrPKnIngZDT75ddr2bihiTv0G3ow Yfcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-189072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c78bc5esi18995695ad.46.2024.05.24.13.04.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 13:04:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-189072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4885DB20AA3 for ; Fri, 24 May 2024 20:04:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B3DC57CB8; Fri, 24 May 2024 20:04:14 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id 595AF383BE for ; Fri, 24 May 2024 20:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716581053; cv=none; b=u4CxeK72OdGpBqVfFyPsIQ69M/tvOOnGOqjtaEBjft5RZX1Q9WNdC+p6HYtj+avhkiDb7JX9LC/c4QJSbQ/ZY0Pebh+w2fdp9XZMw5CAuHJFcgYwwnxAeDjgiFP0VsSoOMPoMjYyjolVAf5AiDCmzoH0rvP4uitv7i8UnQvfVcw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716581053; c=relaxed/simple; bh=BuCYfK/p22E1t/CTAd3Dvp5JyIR5mqEHmLiTTS+jrtE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E7rYIvEG7CyupfeGwhG0p96y42ZKF+q1O2XR8Pzz39uC9kQctOaiv6pOr53xkt0MMGU9+WxXCojEsm1ZXwUWQntybgHz9/1f5iveQS8O1Z3JCaaJI2Po7tIC9kIGouAvuW0p/zKD3wxM+9QNq96gsL+FryFwfuQsThrcsy3NSJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 585212 invoked by uid 1000); 24 May 2024 16:04:09 -0400 Date: Fri, 24 May 2024 16:04:09 -0400 From: Alan Stern To: Andrea Parri Cc: 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, paulmck@kernel.org, akiyks@gmail.com, dlustig@nvidia.com, joel@joelfernandes.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, hernan.poncedeleon@huaweicloud.com, jonas.oberhauser@huaweicloud.com Subject: Re: [PATCH] tools/memory-model: Document herd7 (internal) representation Message-ID: <37bbf3c3-8951-41f8-b900-e81a885b949e@rowland.harvard.edu> References: <20240524151356.236071-1-parri.andrea@gmail.com> 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 Fri, May 24, 2024 at 05:37:06PM +0200, Andrea Parri wrote: > > - While checking the information below using herd7, I've observed some > > "strange" behavior with spin_is_locked() (perhaps, unsurprisingly...); > > IAC, that's also excluded from this table/submission. > > For completeness, the behavior in question: > > $ cat T.litmus > C T > > {} > > P0(spinlock_t *x) > { > int r0; > > spin_lock(x); > spin_unlock(x); > r0 = spin_is_locked(x); > } > > $ herd7 -conf linux-kernel.cfg T.litmus > Test T Required > States 0 > Ok > Witnesses > Positive: 0 Negative: 0 > Condition forall (true) > Observation T Never 0 0 > Time T 0.00 > Hash=6fa204e139ddddf2cb6fa963bad117c0 > > Haven't been using spin_is_locked for a while... perhaps I'm doing > something wrong? (IAC, will have a closer look next week...) I get the same empty result. There's definitely something going wrong in the "with ... from cross(...)" lines in lock.cat. I need to do some checking and testing. Also, lock.cat doesn't check for R events that don't actually read from anything (which will happen when the spin_is_locked() call above generates an RL event). This is a separate bug, easily fixed. Alan