Yes, a customer reported an issue to me.
After my investigation, I found the problem may be the lack of "dmb"
in mutex_lock and mutex_unlock functions.
Moreover, the issue could be resolved after the "dmb" was added.
2012/7/13 Will Deacon :
> On Fri, Jul 13, 2012 at 10:10:52AM +0100, shan kang
On Fri, Jul 13, 2012 at 10:10:52AM +0100, shan kang wrote:
> For example, in the following scenario, Process2 may get the wrong value;
> Process1:
> mutex_lock();
> write data; (store operation)
> mutex_unlock();
>
> Process2:
> mutex_lock();
> read data; (load operation)
> mutex_unlock();
Yes,
For example, in the following scenario, Process2 may get the wrong value;
Process1:
mutex_lock();
write data; (store operation)
mutex_unlock();
Process2:
mutex_lock();
read data; (load operation)
mutex_unlock();
Suppose Process1 gets the lock first, write data and unlock. If the
store operation
Hi Shan,
2012/7/12 shan kang :
> Hello,
>I wonder why smp_mb() is not needed in the "__mutex_fastpath_lock"
> and "__mutex_fastpath_unlock" functions which are located in the
> "arch/arm/include/asm/mutex.h"?
>I think "dmb" instruction is necessary there.
Why necessary? Could you explain
Hi Shan,
2012/7/12 shan kang kangshan0...@gmail.com:
Hello,
I wonder why smp_mb() is not needed in the __mutex_fastpath_lock
and __mutex_fastpath_unlock functions which are located in the
arch/arm/include/asm/mutex.h?
I think dmb instruction is necessary there.
Why necessary? Could
For example, in the following scenario, Process2 may get the wrong value;
Process1:
mutex_lock(lock);
write data; (store operation)
mutex_unlock(lock);
Process2:
mutex_lock(lock);
read data; (load operation)
mutex_unlock(lock);
Suppose Process1 gets the lock first, write data and unlock. If the
On Fri, Jul 13, 2012 at 10:10:52AM +0100, shan kang wrote:
For example, in the following scenario, Process2 may get the wrong value;
Process1:
mutex_lock(lock);
write data; (store operation)
mutex_unlock(lock);
Process2:
mutex_lock(lock);
read data; (load operation)
mutex_unlock(lock);
Yes, a customer reported an issue to me.
After my investigation, I found the problem may be the lack of dmb
in mutex_lock and mutex_unlock functions.
Moreover, the issue could be resolved after the dmb was added.
2012/7/13 Will Deacon will.dea...@arm.com:
On Fri, Jul 13, 2012 at 10:10:52AM
Hello,
I wonder why smp_mb() is not needed in the "__mutex_fastpath_lock"
and "__mutex_fastpath_unlock" functions which are located in the
"arch/arm/include/asm/mutex.h"?
I think "dmb" instruction is necessary there.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
Hello,
I wonder why smp_mb() is not needed in the __mutex_fastpath_lock
and __mutex_fastpath_unlock functions which are located in the
arch/arm/include/asm/mutex.h?
I think dmb instruction is necessary there.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the
10 matches
Mail list logo