From: Li Zhong <zhong@linux.vnet.ibm.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: shreyas@linux.vnet.ibm.com,
PowerPC email list <linuxppc-dev@lists.ozlabs.org>,
ego@linux.vnet.ibm.com
Subject: Re: [RFC PATCH] powerpc/powernv: recheck lock bit in core_idle_lock_held after lwarx
Date: Tue, 25 Oct 2016 13:09:36 +0800 [thread overview]
Message-ID: <F2740D40-FD37-4CE5-BCCD-391021DECEDA@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161025041530.GA17852@fergus.ozlabs.ibm.com>
> On 25 Oct 2016, at 12:15, Paul Mackerras <paulus@ozlabs.org> wrote:
>=20
> On Tue, Oct 25, 2016 at 11:24:34AM +0800, Li Zhong wrote:
>> The core_idle_lock_held loops when the lock bit is held by others.
>> However, it is possible that after the lock bit is cleared, some one
>> else sees it first and sets the lock bit. And lwarx loads a value =
with
>> lock bit set, and the lock bit may be cleared in the following stwcx.
>> It is possible the first one is still executing in the critical =
section.
>>=20
>> This patch rechecks the lock bit after lwarx, and go back to loop if =
it
>> is set.
>=20
> You're quite correct, in fact I posted almost exactly the same patch a
> few days ago... See http://patchwork.ozlabs.org/patch/684963/.
Forget to check the list before sending =E2=80=A6=20
One minor difference, maybe we can use bne- for the rechecking :)
Thanks, Zhong
>=20
> Thanks,
> Paul.
>=20
prev parent reply other threads:[~2016-10-25 5:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 3:24 [RFC PATCH] powerpc/powernv: recheck lock bit in core_idle_lock_held after lwarx Li Zhong
2016-10-25 4:15 ` Paul Mackerras
2016-10-25 5:09 ` Li Zhong [this message]
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=F2740D40-FD37-4CE5-BCCD-391021DECEDA@linux.vnet.ibm.com \
--to=zhong@linux.vnet.ibm.com \
--cc=ego@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@ozlabs.org \
--cc=shreyas@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).