Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2716914pxt; Mon, 9 Aug 2021 07:19:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmbvyL72LvQWA4gHgG8ESPywSGeho81plBayV5fbGGVROKXXWEI/WT9G+9aBeK0kQWYulc X-Received: by 2002:a92:3610:: with SMTP id d16mr227934ila.16.1628518741746; Mon, 09 Aug 2021 07:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628518741; cv=none; d=google.com; s=arc-20160816; b=yj5rDLN7hE8wU+Sn7BBUGA/9aMg/UGRJCte24vZyBbmpMFl6D6f1w+uWDP1oXIRsTv HChNTkErZzvvnFMvYkkMEcv9RfthQpWsQUKY9cPv8v13m6oz31Qo5YUHFi05qLfW5jBh ZqOakxOa7P8RKmnsl3LuythKAOfYpjuIZRz+ihNIrpMRi2pkuvBXwyhYQVB+8lTK8JHF Nc7uxgZF9yc8MbTToQXjSQRpQqsuxwD9pRCQVBX3/9TPGWFBjZkmbqhiAC7BCxnTfYEz ki+WegYVeMoJ3Wv5hYngQOAjkb8+00FA8A1DXKVYIzKC5Q1xLz1Y3HT1OtYtZVrVrI0R aUDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YD7C0V8mD7mOzFH72PyAbi+9popLMNZjiuhIqm4rKv4=; b=B2IBHL03UXS9fWfLaKz8i9TInKnikws6GfCgfRMGZroLcw0lN7Hdob/P992gjqJrS2 1OMGy1xwnQRDUpoNn4TtyVpXEielFVy6KpesO6wMAIHkPsQWOjdQlvYJnbdU8gr2qvS4 3Ti+pR1MHum33YLv5efWu2U9C7qe0R4+jM2p6yE7FLxE+JVqsyCQcACUF8GZnDM0BA+k OnArZkRYP/FaPmHZ/z4RcKRo0szK2ZR8inUwG4SYyInEez1zADXexxEqGCgxDCC3Cznj VZqcpISwyKppy1+67lDIH7QrWSyJCwXXYAo/XydK2b1f9amvg9qnCqvFRAks0ej2IdxV FBGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cQsOmkyd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 13si18718086ilt.16.2021.08.09.07.18.50; Mon, 09 Aug 2021 07:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cQsOmkyd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233953AbhHINlO (ORCPT + 99 others); Mon, 9 Aug 2021 09:41:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:45000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233726AbhHINlN (ORCPT ); Mon, 9 Aug 2021 09:41:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 44C6661019; Mon, 9 Aug 2021 13:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628516453; bh=hT7LUl3BDmjtvsjoYEQ5DHDr/BtZa9AQp0ujIPii340=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cQsOmkydIdMNDmfU+DkCy5nVJ1jbouiKpyDAKSxVnrgVi6JSNN+CFjgcc0sc65V/2 Tqit//6GaJbd0ZPlX20Ylck6+41Rt2I8Dcl/qwVhakVWJRizzmoDJJ5T0cDL/AIcTM Fjne9nL4yvUeLrncuSI5LN7OlXkcQ2Z+im6C2vrkQLDuclxsC0HOJfHSRcituoVn6s XF5iKdvbh43BeI/ddHWdBh+cnVrlfaufVSKogeuBpEKTsP+QPq3yYjYvS/UTcx5FFn XBdOolAJGggBZ8ZRcPt/5bDQ6re2nrVrVXLmXYnpNJMs2uiaCLWQZEcburCNyiDWHf bCUXyZ32sVWmQ== Date: Mon, 9 Aug 2021 14:40:48 +0100 From: Will Deacon To: Zenghui Yu Cc: peterz@infradead.org, mingo@redhat.com, longman@redhat.com, boqun.feng@gmail.com, wanghaibin.wang@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] locking/qspinlock: Fix typo of lock word transition in the uncontended case Message-ID: <20210809134047.GB1207@willie-the-truck> References: <20210715030847.2038-1-yuzenghui@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715030847.2038-1-yuzenghui@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 11:08:47AM +0800, Zenghui Yu wrote: > If the queue head is the only one in the queue and nobody is concurrently > setting PENDING bit, the uncontended transition should be n,0,0 -> 0,0,1. > > Fix the typo. > > Signed-off-by: Zenghui Yu > --- > kernel/locking/qspinlock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c > index cbff6ba53d56..591835415698 100644 > --- a/kernel/locking/qspinlock.c > +++ b/kernel/locking/qspinlock.c > @@ -355,7 +355,7 @@ void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val) > * If we observe contention, there is a concurrent locker. > * > * Undo and queue; our setting of PENDING might have made the > - * n,0,0 -> 0,0,0 transition fail and it will now be waiting > + * n,0,0 -> 0,0,1 transition fail and it will now be waiting > * on @next to become !NULL. > */ I think this is an important typo fix as you're right that we don't transition directly from having a waitqueue installed in the tail straight to an unlocked state. Acked-by: Will Deacon Then again, I acked the patch introducing this comment so what do I know? Will