Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2523041lqt; Mon, 22 Apr 2024 13:12:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHKcBkOuL+8Q1R695dZnALBH9MrA3ln9dp7K6NlpSgBIDPKtTmU5Eb1zmXfcevpHW961wAMzdLUl5bExiu0Flq9eiEkX7rUnYFumQqKw== X-Google-Smtp-Source: AGHT+IErtT7kRxv4Yz8D95YRJc+SOcdexmYgqUliJDA45g8KQ27LsoFJqhyDyEyOwlph/qOaGNrV X-Received: by 2002:ac8:5e07:0:b0:436:4d7c:8a9b with SMTP id h7-20020ac85e07000000b004364d7c8a9bmr14817714qtx.46.1713816753457; Mon, 22 Apr 2024 13:12:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713816753; cv=pass; d=google.com; s=arc-20160816; b=jtRLyfdTUFAUEJLGC+rSjUrHwoKrev2jeSwhXhHBC3yfXtxxHrwT5ocDXDJzRaH50v Y/rrqFLXFedYhgeZzKt+25eHZfcubPw8LOdsDGtYZijEvvdwA+vN7YxE7DFijE19lkUv j2uTHGau2z6MgEM+h2Fzxo/6SAhylm2SYaFqQvLt4SZz3+yRbXrIU94PxiUDY5/Ke+UB Z8/VsxxWFRkiUoI7BVcFDXOZZy5bwUxdqOAACfseYH41zIRZNdDe6ke8XApUdQDLkhxX hZw9gKXE+1utU/W+EK813abBehW4ve6TjXwAtEfmni5v+JzAIG1cNYBUOROpY4/OmpBk Vumg== 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=Zn4tMIf6pjNTvax1oNxBr2Cc6HOC5Rj/gnb2ttcyBPM=; fh=eYRthh4iOJ60rbflzPJQcsC798zzerbNTV8DJ3w0zFM=; b=V/tDJQbeoKb+C5jN/+tKIRwT87ARWPCx/ACJoTYzK8O9f9ZMFGcvvHOSDGs6sqKnh7 aDvS8o5E8XBRfZ7fjfY9NG1aS6C1Sw6dUfmqdA7ffnx523In96uqEmjy/M+kaTTT3U4K 6Ona5NcMhtEWFNgmNIEHSi+2kt09O4OQ/x+poDNfoC+dM1gcWa8yH0G5ttbS5fiOP3rs +k5W8eERLqssuf8n0qX9IqrT51IQ6u+7VC6oF0OKtrXUpm+SWgd9FKoMOrkM4m2ue97B 4wdiZ1sTKee5Ima/jh9Va8BscidFmSvkik3z4wfmZOzvGqFsQxneY3tLOyOKDEf9LzKo Glbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jCn6ihSb; 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-153988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153988-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 d13-20020a05622a15cd00b00439d06bce61si1704434qty.124.2024.04.22.13.12.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 13:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153988-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=jCn6ihSb; 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-153988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153988-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 33CB01C20F01 for ; Mon, 22 Apr 2024 20:12:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34E7C1553B3; Mon, 22 Apr 2024 20:12:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jCn6ihSb" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 D7133153BE4 for ; Mon, 22 Apr 2024 20:12:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713816746; cv=none; b=Y80bPFldc7mnudEDMEVwVVb4+LAuP+G+5zJ/PraW4HrFfToQQamYWEKckdzzMJMacxshyMCBQiwouoou94/Qz35UXEWnfq1eAz2N0sVpIFI/Be0oaBQ8jZTKDRSZO7wh0BCMBulV8vQx2UUf7Zg2IkKFhdtNkRiSkAymc3kPrbk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713816746; c=relaxed/simple; bh=raeU5zI++up4g4kra+u3lA7/z1aEJaTNNxdJPgPMYXM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JuAVL1MCoXQO+yXCMXPSLZJvDOSIEt6LWs+N3AhkP1XHAYnPndpon/I2asduJZiQ4lUzd28UxLrMy6VKeiEhhzPIxaj0wxf/3O5OVJ7BCkhklctlyoo1zoQ8tHLiULH43PKuLNdyyNF7ZsC455WM2N2pUX9lRDYdQ5aqrghcwjI= 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=jCn6ihSb; arc=none smtp.client-ip=209.85.208.175 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-f175.google.com with SMTP id 38308e7fff4ca-2d872102372so44503321fa.0 for ; Mon, 22 Apr 2024 13:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713816743; x=1714421543; 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=Zn4tMIf6pjNTvax1oNxBr2Cc6HOC5Rj/gnb2ttcyBPM=; b=jCn6ihSbEfjAUz+jRxnVmE2cs3l9l6xtAw6GSnkmk757zkBQv1of6tobUtuQgSIWa2 b/ntZIICZb8bj8t0JAhLUlPGg7n+bxJR9qWl/K7lXQu2W2VJ0p/Apu7MgEtohEmGV0vw y4IW87BDT13H7UhFWJGV0yGQLEW4rvvAlPK9VGco2HIWp/DgWF2J8mYNVNWA8QoYj8tO CmQf3xJcWMHLstF7u7VujH6CedM9MA4/xeaeF9wzZ+WpgOrQ2gtghqnmv6hMB4Ojbd5o Meo3WkTSO3A36ylSvKtIjPDnKRHgdjTEJHDTXVlwSQiSBlBHc4hU6H4mCqV0L4cquNGE WLfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713816743; x=1714421543; 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=Zn4tMIf6pjNTvax1oNxBr2Cc6HOC5Rj/gnb2ttcyBPM=; b=ENgYkEoPMXCFoInkDg4SUfjnyM67FbQh2qQ/reT1YNPYl8zEvYa5m21R94vOD3cNQB kwnECuZylhjUX8bA9W47xrRHF7qIgfftTwjYnPdBDrJ0PYd2tfnwzw6I9NeSECqJdBBy vT6BiFTGOW8h41jCtrOX2WQ/vvBqC4r3RI8kiH/FiIRpMFaIDugI1Idu0WqMMC/spP41 xyDrjIrUrGgMCzM+yQTx9htMhyH7VHnAlAT3ZBM6239XFHz7gN/Zk011c3t7WP5kcDmt GxuWOpEvrORtFslHlwJQC7ON7xRItYaGNzwHEUxSUHMfZAbGuhs82PfFyuCyo2jfcDzt NvoA== X-Forwarded-Encrypted: i=1; AJvYcCVPDlhft9bhIjEUVd+w8+XcPsUIT+3+ORk8sILWaSQaKkAyuvqBXL37x/EiCZ/wchjpuUFOVkJWUOMhwMZE7HN/xNonZ2XvyHF2RmaF X-Gm-Message-State: AOJu0YwS4QBjHAvbuZHKMy9ishuJnuS4ZQ8pX1a5fCvCRJocsuWaygGa pOyuKPxvcGlQx+O6ElIUKozOjOVYVfl8yK5AxigtTTrGiQKZ7TXtsGSbTJHnJ9lSpf759bNChYa Q3NFvy0M4boVCceLFbG3wi/yH9Vs= X-Received: by 2002:a2e:9958:0:b0:2da:be98:83e3 with SMTP id r24-20020a2e9958000000b002dabe9883e3mr229698ljj.21.1713816742827; Mon, 22 Apr 2024 13:12:22 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240422151752.53997-1-ubizjak@gmail.com> In-Reply-To: From: Uros Bizjak Date: Mon, 22 Apr 2024 22:12:11 +0200 Message-ID: Subject: Re: [PATCH] locking/pvqspinlock/x86: Use _Q_LOCKED_VAL in PV_UNLOCK_ASM macro To: Boqun Feng Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 22, 2024 at 10:00=E2=80=AFPM Boqun Feng = wrote: > > On Mon, Apr 22, 2024 at 09:57:04PM +0200, Uros Bizjak wrote: > > On Mon, Apr 22, 2024 at 9:45=E2=80=AFPM Boqun Feng wrote: > > > > > > diff --git a/arch/x86/include/asm/qspinlock_paravirt.h b/arch/x86/i= nclude/asm/qspinlock_paravirt.h > > > > index 466af57b8ed6..0a985784be9b 100644 > > > > --- a/arch/x86/include/asm/qspinlock_paravirt.h > > > > +++ b/arch/x86/include/asm/qspinlock_paravirt.h > > > > @@ -40,7 +40,7 @@ __PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlo= ck_slowpath, ".spinlock.text"); > > > > #define PV_UNLOCK_ASM = \ > > > > FRAME_BEGIN = \ > > > > "push %rdx\n\t" = \ > > > > - "mov $0x1,%eax\n\t" = \ > > > > + "mov $" __stringify(_Q_LOCKED_VAL) ",%eax\n\t" = \ > > > > "xor %edx,%edx\n\t" = \ > > > > LOCK_PREFIX "cmpxchg %dl,(%rdi)\n\t" = \ > > > > "jne .slowpath\n\t" = \ > > > > > > There is also a "cmp $0x1,%al" afterwards. > > > > Not anymore. Please note that the patch is against -tip, where we have: > > > > Oh, thanks for the information. Maybe it makes sense to mention the > patches dependency in the commit log? Hm, yes ... I should mention this as "[PATCH -tip]" in the subject line to avoid confusion with this particular patch. Thanks, Uros.