Re: [RFC PATCH] powerpc/powernv: recheck lock bit in core_idle_lock_held after lwarx

2016-10-24 Thread Li Zhong
> On 25 Oct 2016, at 12:15, Paul Mackerras wrote: > > 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

Re: [RFC PATCH] powerpc/powernv: recheck lock bit in core_idle_lock_held after lwarx

2016-10-24 Thread Paul Mackerras
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

[RFC PATCH] powerpc/powernv: recheck lock bit in core_idle_lock_held after lwarx

2016-10-24 Thread Li Zhong
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