From: Paul Mackerras <paulus@ozlabs.org>
To: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: PowerPC email list <linuxppc-dev@lists.ozlabs.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
shreyas@linux.vnet.ibm.com, 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 15:15:30 +1100 [thread overview]
Message-ID: <20161025041530.GA17852@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <1477365874.10026.7.camel@TP420>
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.
>
> This patch rechecks the lock bit after lwarx, and go back to loop if it
> is set.
You're quite correct, in fact I posted almost exactly the same patch a
few days ago... See http://patchwork.ozlabs.org/patch/684963/.
Thanks,
Paul.
next prev parent reply other threads:[~2016-10-25 4:15 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 [this message]
2016-10-25 5:09 ` Li Zhong
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=20161025041530.GA17852@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=benh@kernel.crashing.org \
--cc=ego@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=shreyas@linux.vnet.ibm.com \
--cc=zhong@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).