Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2583161lqt; Mon, 22 Apr 2024 15:28:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVm6Lthup2vv+dq/KJONVXESvGQWusIzCoa8e3IVBzqCoqrhu80STGCHnMVtpLr7Y4I3WkDdDxU4Qk/tgi0tA4Ta2ZT3sNeVuZgenifgQ== X-Google-Smtp-Source: AGHT+IG7Nl2XTHuEXRCzMO01QtnkKwaQUaofWoSGowosuNteMDD+yq0w46tEKGLB3cMJFLvpDH2y X-Received: by 2002:a05:6870:2114:b0:22e:ca59:8faa with SMTP id f20-20020a056870211400b0022eca598faamr13440448oae.34.1713824906740; Mon, 22 Apr 2024 15:28:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713824906; cv=pass; d=google.com; s=arc-20160816; b=inmoX7kycQ7N017IjCQogRUCi08+m8iZ1rk9GMN1UGmUQzX6J8qb6HGqMx48IRHuOy laA/6nbAIh0PB6jZiCak4r53IotTBD7nuc9myptWnmkeVYWxecjUuKm6UAP2y9ZXkB84 VZQusy1EB7ogad5wXTU/5qdq35RWCcMoOOIvolM1c75ZkjI9Ob+rFe/Y9EciJuDtWHR2 2k4Rw1IqBtHHOUY6Wz2ybAfiQuvFOusLS4KwaHxZS//6ROByQlaInpzTjNTC/GkKP+eC fHUTIm+tm6djIUaKToI1JeBQrdrQfFSO1B67dc0+1EECopyjVqP1T0edZhSXV3yGFYNc k85w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=leSnoNO9vQrVE5sfz5zVqfPLAcq7aLQPMSXK8GtpNmg=; fh=b848UjBu2FZ+C4q5woZ60wIrE4pHsA/XQWOYG5Rp9Ns=; b=d9iE5WMyoEw1VUkYiGCKdGsv4KVfamK+Se1V/4w6kdndNC8adxZKEjjEEzqY91KDYd aEZZGPOKYGRWHVf9ZIROeZWEcLWXHMIYSBS8tVvkq9HYF5q5mj7Pb9U18g0KsiDolmz2 JEb7oinFUxLr2VwJuRG3+IT74QiAzQDGBTCQ2hXMuO1e0f9Fn9TG0/cm9FlpKRIZmveq cMMG6YhUXEZ3mv4CqxMvGqJjdE6l2TaO/nHf1eEkKfqdZFcJs5SURk5lc9AeCzdQHd5A vzmzdEXHrCsH/5xHncWWfX7gDETldE0zaH0jdDPgPpIGT+uzx7rxD194PV6xBLHbuc3g KbuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N6KIrESC; 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-154089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m11-20020a63580b000000b005e84e71d9b6si8595329pgb.93.2024.04.22.15.28.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 15:28:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154089-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; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N6KIrESC; 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-154089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154089-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DEFADB21EAA for ; Mon, 22 Apr 2024 22:28:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D84E91F934; Mon, 22 Apr 2024 22:28:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N6KIrESC" Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) (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 9C2871CF8B for ; Mon, 22 Apr 2024 22:28:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713824888; cv=none; b=biPcmrBfR8+/Y7VC0nmrfN0X/FxBQVLH/kyN4Uf5KmCmsK+t3cK5Ei8hBUG1r6cJp6Ak4hid8+iF78XCeSPaQcBF8Q+TqVjgOOJQ+kAdemhOgSr6fQD6Z/Vp7piN+bdDkKmQAl6kmU5MVU7zEQG6/EEApw+taDaAtZ5DnYl5bT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713824888; c=relaxed/simple; bh=MLFkybndloaTyhzy2NSZlChDIyrEPGzYpaVyXPRXuPk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uAfYQTnK7CmCKEDyIss6Huw9hMVi8jLrCyXohST0QXCvk+ct30FSo+2iThkaQBfz25AFWzhCtWKhZheDd6gDC3HU8cq+W50vPTceguFDO/ZYO4oIFE+uyAI5Uy82fzdZdAqkjkx59Niuu4I9A24C5a29wIF5yIBKe6EbnftiKZg= 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=N6KIrESC; arc=none smtp.client-ip=209.85.161.53 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-oo1-f53.google.com with SMTP id 006d021491bc7-5ac8c73cf88so3228629eaf.2 for ; Mon, 22 Apr 2024 15:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713824885; x=1714429685; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :feedback-id:from:to:cc:subject:date:message-id:reply-to; bh=leSnoNO9vQrVE5sfz5zVqfPLAcq7aLQPMSXK8GtpNmg=; b=N6KIrESCM3tkYm1ICQEHhzqGPTNy9HtXTfBX8KWhH99ICtwSVWB5GwyQzgKPijOyl+ 8notiZqfalyKnfvG6l9maizlCDn9JUDklj+ubQaJo0L9sEHs1Ulcz2tA/pIQRewHN2Tv 6zZktUPEBVbFukST9xjIPN8iZBhkfOaCGgmaat6goIq/KqjDK3dBPHPj0DqzRW0PmJzM MWmq/wZAewEJfxL8BALMb9M4dejbxJzRSwm2Y4jV44xymNseckJGwRBb7uOlq1QyIr1a lgzbNWpJI7RK34sZowETfTsLpPJpwYYuMl9VAOJkQvnY44Ha6VoOTZD9uUVieKGXw5LF 23JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713824885; x=1714429685; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :feedback-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=leSnoNO9vQrVE5sfz5zVqfPLAcq7aLQPMSXK8GtpNmg=; b=HLQp0ApWt1SFK076gr78xQ11OXNMubnyQcMQNw1AiDU6bCFQZ7NgtopIsowXLikn22 2i2pbyEDxVf0kbIHU8P16Gko5hkkoru25/yDFj1Ye4IVdunSLPJNlRtkKrTHfI0fyb9L /AFR3YW1gf6ydVLEdaKCCdHp0oky58hcLE5gFDL7Pt08AfkHQ7md/eAyfmuBKmWZrDZW TZTqNmjG3IJUTrLmMxz58IyuuujwD91vSaD/QiHhLCnfWGvGV/MO5m5RAKqmzUv3x7F0 EwRSgn5RrwQIa2FdAioVyXFPh23SyrzlArE7mlsGlR0v/2zzipgST/yZLUo7WkE9arbo yHKw== X-Forwarded-Encrypted: i=1; AJvYcCVw5C4hf46vMlQK1XUB3Vdj2TVG1k9gjulGmh9MUASEOoUuzMByhAMlQ6uvI4iwg6l7JVXpeH+6YpG89qAM0c/7eJ4NfNEg7IamyHYK X-Gm-Message-State: AOJu0YxWz58xtJjN5AgJADeex7yIJOInis9ax+CxPaFQM3+iJSzOZl+w 6D7vegRPse1sAtmU1sNeyqwiws+UNzscv90KX9RIQ1xhjWUPPgOa X-Received: by 2002:a05:6358:2c83:b0:183:f0e8:b632 with SMTP id l3-20020a0563582c8300b00183f0e8b632mr15132548rwm.11.1713824885499; Mon, 22 Apr 2024 15:28:05 -0700 (PDT) Received: from fauth1-smtp.messagingengine.com (fauth1-smtp.messagingengine.com. [103.168.172.200]) by smtp.gmail.com with ESMTPSA id du30-20020a05620a47de00b0078d65fbde2bsm4698001qkb.86.2024.04.22.15.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 15:28:05 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfauth.nyi.internal (Postfix) with ESMTP id 9BB201200043; Mon, 22 Apr 2024 18:28:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 22 Apr 2024 18:28:04 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeltddgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpeeuohhq uhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrf grthhtvghrnhepvefghfeuveekudetgfevudeuudejfeeltdfhgfehgeekkeeigfdukefh gfegleefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epsghoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedt ieegqddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfh higihmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Apr 2024 18:28:04 -0400 (EDT) Date: Mon, 22 Apr 2024 15:28:02 -0700 From: Boqun Feng To: Uros Bizjak Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long Subject: Re: [PATCH] locking/pvqspinlock/x86: Use _Q_LOCKED_VAL in PV_UNLOCK_ASM macro Message-ID: References: <20240422151752.53997-1-ubizjak@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Apr 22, 2024 at 10:12:11PM +0200, Uros Bizjak wrote: > On Mon, Apr 22, 2024 at 10:00 PM Boqun Feng wrote: > > > > On Mon, Apr 22, 2024 at 09:57:04PM +0200, Uros Bizjak wrote: > > > On Mon, Apr 22, 2024 at 9:45 PM Boqun Feng wrote: > > > > > > > > diff --git a/arch/x86/include/asm/qspinlock_paravirt.h b/arch/x86/include/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_unlock_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. > Anyway, the code looks good to me. Acked-by: Boqun Feng Regards, Boqun > Thanks, > Uros.