From: Waiman Long <longman@redhat.com>
To: "Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] locking/qspinlock: Fix state-transition changes in comments
Date: Tue, 9 May 2023 10:57:45 -0400 [thread overview]
Message-ID: <43868b82-4f13-ebcc-ea7a-86f11f6096f6@redhat.com> (raw)
In-Reply-To: <IA1PR11MB6171282A1E2CF22740398F8989769@IA1PR11MB6171.namprd11.prod.outlook.com>
On 5/9/23 02:57, Zhuo, Qiuxu wrote:
> Hi Longman,
>
> OK, so, you are from the point of view of the CPU (the lock word value it read last time)
> doing state transition in the uncontended scenario:
>
> [1]: Old lock word value (this CPU read it last time) ---> New lock word value
>
> I'm from the point of view of the current lock word possible value that its state is
> transited to the new lock word possible value (I don't think I'm the only one from
> this point of view when reading the qspinlock code ;-).
>
> [2]: Current lock word possible value ---> New lock word possible value
>
> I'm fine to keep the view of [1] in the current code and get [2] as the backup.
> I'll send out a v2 with just two minor comments' fixes.
The purpose of those transition flow charts is to help understand what
the code is doing. So they should reflect the running CPU point of view.
If you want to show what all the possible values can be, you have to
explicitly state that to avoid the confusion.
Thanks,
Longman
next prev parent reply other threads:[~2023-05-09 14:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 6:29 Qiuxu Zhuo
2023-05-08 15:29 ` Waiman Long
2023-05-09 2:03 ` Zhuo, Qiuxu
2023-05-09 2:30 ` Waiman Long
2023-05-09 6:57 ` Zhuo, Qiuxu
2023-05-09 7:29 ` [PATCH v2 " Qiuxu Zhuo
2023-05-09 15:09 ` Waiman Long
2023-05-09 14:57 ` Waiman Long [this message]
2023-05-10 5:28 ` [PATCH " Zhuo, Qiuxu
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=43868b82-4f13-ebcc-ea7a-86f11f6096f6@redhat.com \
--to=longman@redhat.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qiuxu.zhuo@intel.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®