Re: [PATCH v9 1/6] MCS Lock: Barrier corrections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 21, 2014 at 11:35:53PM +0000, Tim Chen wrote:
> From: Waiman Long <Waiman.Long@xxxxxx>
> 
> This patch corrects the way memory barriers are used in the MCS lock
> with smp_load_acquire and smp_store_release fucnctions.  The previous
> barriers could leak critical sections if mcs lock is used by itself.
> It is not a problem when mcs lock is embedded in mutex but will be an
> issue when the mcs_lock is used elsewhere.
> 
> The patch removes the incorrect barriers and put in correct
> barriers with the pair of functions smp_load_acquire and smp_store_release.
> 
> Suggested-by: Michel Lespinasse <walken@xxxxxxxxxx>
> Reviewed-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Waiman Long <Waiman.Long@xxxxxx>
> Signed-off-by: Jason Low <jason.low2@xxxxxx>
> Signed-off-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> ---
>  kernel/locking/mutex.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)

Reviewed-by: Will Deacon <will.deacon@xxxxxxx>

Will

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]