From: Zenghui Yu <yuzenghui@huawei.com>
To: <peterz@infradead.org>, <mingo@redhat.com>, <will@kernel.org>,
<longman@redhat.com>, <boqun.feng@gmail.com>
Cc: <wanghaibin.wang@huawei.com>, <linux-kernel@vger.kernel.org>,
Zenghui Yu <yuzenghui@huawei.com>
Subject: [PATCH] locking/qspinlock: Fix typo of lock word transition in the uncontended case
Date: Thu, 15 Jul 2021 11:08:47 +0800 [thread overview]
Message-ID: <20210715030847.2038-1-yuzenghui@huawei.com> (raw)
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 <yuzenghui@huawei.com>
---
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.
*/
if (unlikely(val & ~_Q_LOCKED_MASK)) {
--
2.19.1
next reply other threads:[~2021-07-15 3:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 3:08 Zenghui Yu [this message]
2021-08-09 13:40 ` Will Deacon
2021-08-09 16:22 ` Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210715030847.2038-1-yuzenghui@huawei.com \
--to=yuzenghui@huawei.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=wanghaibin.wang@huawei.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®