barriers in mutexes?
Hello,
Looking at kernel/mutex.c and arch/arm/include/asm/mutex.h, it appears there aren't any memory barriers in the fast path of mutexes. I see this was discussed here a long time back:
http://patchwork.kernel.org/patch/25856/
How was this resolved?
thanks,
Steve
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Quoted 9 lines · Steve Muckle
Hello,
Looking at
kernel/mutex.candarch/arm/include/asm/mutex.h, it appears there aren't any memory barriers in the fast path of mutexes. I see this was discussed here a long time back:http://patchwork.kernel.org/patch/25856/
How was this resolved?
bac4e96 ([ARM] barriers: improve xchg, bitops and atomic SMP barriers)
Quoted 10 lines · Russell King - ARM Linux
Quoted 7 lines · Steve Muckle
Looking at
kernel/mutex.candarch/arm/include/asm/mutex.h, it appears there aren't any memory barriers in the fast path of mutexes. I see this was discussed here a long time back:http://patchwork.kernel.org/patch/25856/
How was this resolved?
bac4e96 ([ARM] barriers: improve xchg, bitops and atomic SMP barriers)
The fast path of mutexes on ARM >= v6 doesn't seem to use these operations - it's just ldrex/strex. Looking at the v7 ARM ARM it seems barriers are still required with ldrex/strex.
thanks,
Steve
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Quoted 8 lines · Steve Muckle
Quoted 7 lines · Russell King - ARM Linux
Quoted 6 lines · Steve Muckle
Looking at
kernel/mutex.candarch/arm/include/asm/mutex.h, it appears there aren't any memory barriers in the fast path of mutexes. I see this was discussed here a long time back:
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
How was this resolved?
bac4e96 ([ARM] barriers: improve xchg, bitops and atomic SMP barriers)
The fast path of mutexes on ARM >= v6 doesn't seem to use these operations - it's just ldrex/strex. Looking at the v7 ARM ARM it seems barriers are still required with ldrex/strex.
Patch welcome.