Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp400623lqg; Thu, 11 Apr 2024 06:36:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZmnDXmzxzqLakjKBwsISk61+SX06wvIwb6Xftq3Z830vUNQXWnkSoKbqVNIc+zzEiuz95W5guavTQc+kJwZGKfSvgp78fPR1iJ4Iwcg== X-Google-Smtp-Source: AGHT+IGh/0IdNfsnyY337un2ZyU7WgWqg5M5VnzYXfqq36E+D0gLMDFUukjrTg/CQOAcb8RDQ1qq X-Received: by 2002:ad4:5d6a:0:b0:69b:1be3:e76a with SMTP id fn10-20020ad45d6a000000b0069b1be3e76amr7020204qvb.46.1712842576958; Thu, 11 Apr 2024 06:36:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712842576; cv=pass; d=google.com; s=arc-20160816; b=IIDqpqARwPkIit4XFmt3s/EyC8IoA7iUYo3YGIcthsOBJ2iHwyACVtTEn0fYDmhIWc Zb1U89m++6jQKPNKRusYjjZSGKu+rC1Ig04WgNl5WPJqYop8go9t+Zw8lSkJhj70AJkv XvOjqc0Mkay+llw6ygaHhhCiucMN3BPiexcw3ef77yOROdgqSZBe0HVQ0eVypqH2+yTr jPjX+RKkd2fmcgYh6yL3jvZBwOGUAU2F1PjsvC8WjVdPwNbXuTVFvA8cPKvFZCV5CAH6 HsRicPo/bWfGu7AKCITgZqK9Uzem7hI25jB+N8KgbqHxTuiZDZtYuMOm8n6gYsiGxkt5 t3BA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=HUilBbtANZfZu2KLsNEzIHaWmD7NhSLDebUqumoPb74=; fh=GqRKsMB2ywMoqjB1QPL9d/P49AWnzVWq0axO9I1mBWk=; b=O8Mv1cba0qHdN+lsekEvSLWK+UObQuPaPFTLfBbNEhlFJuudQZYZquRfyQ/wrKeiJl WrfCjcoseacWxl4gI55DsY3KoFzDfCXNSmIBKS24wuhS+I15rKDRoUDZ9iLFhdEbG/Qt 3MCeqLBngQm4Gap6HhrmM8U0RsscuiEzvAho6UuSlu4jNdvlrfF6cqUYiKqGMwuRnHlm IVlapSPzzFR6m36ZF+P7JI9p2wSXlail2slfqXgI8e8WJ7SMCfgOG/4vk4TaN8EkPxb2 o/HHPPvPGvq3n/uklNcRUPyDJQmxf093sN0YE/hqM/I5K0pCuVvXDm8IMxyo9cxXJkty IT/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nh7MeBPB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-140519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id eh8-20020a056214186800b006992c5d554fsi1439846qvb.546.2024.04.11.06.36.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 06:36:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nh7MeBPB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-140519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id ACD181C2138A for ; Thu, 11 Apr 2024 13:36:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30A1A14D299; Thu, 11 Apr 2024 13:36:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nh7MeBPB" Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8BFA28FD for ; Thu, 11 Apr 2024 13:36:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712842569; cv=none; b=AF+LUkwYptOfEMvzA4PCOV2sxuhkA3ZmUfiRDl9gq7nDIpFpU4mbjJ6rHoRBCfsyanij6lAIHnPN259DHHxKIbtfoijw3WKOSf4OTCoB4joH9LgW6Fi/eefYeucBfgx7Ln68I3w+XhTAgmlHqRuXI0RHw8v+l37jj52g5+C6mNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712842569; c=relaxed/simple; bh=J65q02IkBAMdMPztaOg8GyYPL9bgzAS2+QnkXHoH76Q=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=uJmoDsQtWjPQmQZpUOnO5P2WxWmyJg/sEq1XcLysnGvzepb3vNE3LAdV7okNsRoDdt3b2RKzlQi27ngk6F9/eq0Mjb4av/2IbhZnaLZGhRFuaC4P+CHB5oWJBgTa8XHAk+d4JU6q4R/fJgqcbjPlygm6+sTGLcS5LV/UlY/WfF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nh7MeBPB; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2d4886a1cb4so93269251fa.0 for ; Thu, 11 Apr 2024 06:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712842566; x=1713447366; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HUilBbtANZfZu2KLsNEzIHaWmD7NhSLDebUqumoPb74=; b=nh7MeBPBOSA6eIdZIDOP01AP1MvzNez3lP9YFiDj826j1Qmwh7SezlHzur8T7dON/a JWJykVjGYKoQ3K9gXABlmTh6+yxXicwc2IsbEHvT4MFICgbrrksKSlCrWi+h6c1qWdRl 6hoeKox+wDN2Cv5bmukJupqhzWlFnxMlY9P8Z441cTXW2Q9gUhJXqQsxk9zfuzvNgUzq rsspD9I+/lgvJKukOkDkDhfnxrwi8CPPowzGNXTzUqYMt/n2CQ7GczSWKv6JhMo63J0E hP+uC+uW4fe28ipjcNbjxX8oR1wVS5DZY+/4vvJkw3wCV4aUD+0lghT6jWwPEbU7dA6F 4HhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712842566; x=1713447366; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HUilBbtANZfZu2KLsNEzIHaWmD7NhSLDebUqumoPb74=; b=w8KEA1kUklsR7ZqDNYQ7c90iBjMvmv7+jOvQdMgvIO19UmJK3KQF1BNUX2R+LiwjRD eRe+RXSsLYLwB2wO1h2eymwm2rMVv47YryPk2zl3bfO4p42pCkkJRkPaJqVny99n9quu tj+3CSnDO3LPSRZTX6DbjRPspHR0YIuBL+o2w3FHk5k1MBoXlwUQrlRLh6QzC97YI89s THHl0qqPPiwa0JfiW+kXs8NGMltxYCjWvW0J8L3Ng0nTUTni+wPdfz41gbH04GQnxiSx DI57z80+bGZ6FwrYcBNSfa9295YC7eDWbVWysxYsSf9CYLDsEyyJDDc1WYmOmQncJsK6 f+uw== X-Gm-Message-State: AOJu0Ywp+tNjE07kXZ7DTKgxLv/EWhzKocpZxxWKpb2MH1R7t/9Ps4+Y 6Oj97crKmAh0038rvBmrZQxrsctTfpMecaiCamwfkFLntIjjdZ0orILBp3tV4lb8THxXNXIu4mN LWV1wwbkr5GIALbV7X2JXSEI8Jqk= X-Received: by 2002:a2e:8757:0:b0:2d9:e54d:81eb with SMTP id q23-20020a2e8757000000b002d9e54d81ebmr1087996ljj.12.1712842565802; Thu, 11 Apr 2024 06:36:05 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240325140943.815051-1-ubizjak@gmail.com> <20240325140943.815051-2-ubizjak@gmail.com> In-Reply-To: From: Uros Bizjak Date: Thu, 11 Apr 2024 15:35:54 +0200 Message-ID: Subject: Re: [PATCH 2/2] locking/pvqspinlock: Use try_cmpxchg() in qspinlock_paravirt.h To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 11, 2024 at 3:24=E2=80=AFPM Ingo Molnar wrot= e: > > > * Uros Bizjak wrote: > > > - locked =3D cmpxchg_release(&lock->locked, _Q_LOCKED_VAL, 0); > > - if (likely(locked =3D=3D _Q_LOCKED_VAL)) > > + if (try_cmpxchg_release(&lock->locked, &locked, 0); > > return; ^------------ ?= ?? > > This doesn't appear to be a particularly well-tested patch. ;-) Ouch, embarrassing... oh it is a generic function, conditionally compiled w= ith #ifndef __pv_queued_spin_lock #endif and x86 defines its own function ... I concentrated on different settings of _Q_PENDING_BITS and the above slipped through. Thanks, Uros.