get the result: b==2 & a==0 , which means although cpu1 set int1=1
> before int2=2, there is no garentee for cpu2 to perceive int1 before int2.
> you must add smp_rmb() inside cpu2 to prevent this.
>
> two cpus must cooperate to acheive the sequence memory order.
>
>
>
&
Hi Subin
On Tue, Dec 13, 2011 at 01:57, subin gangadharan
wrote:
> Hi Mulyadi,
>
> Thanks for the answer.
You welcome...I just shared what I know :)
> In that case (ALPHA), is compiler barrier sufficient enough to prevent
> the re ordering done by the processor.
> What I was thinking,compil
Hi Mulyadi,
Thanks for the answer.
On Mon, Dec 12, 2011 at 11:16 AM, Mulyadi Santosa
wrote:
> Hi...
>
> On Mon, Dec 12, 2011 at 01:11, subin gangadharan
> wrote:
>> Hi All,
>>
>> I am reading about the barrier from linux kernel development.In this
>> books, he says
>> "On SMP kernels they are d
Hi...
On Mon, Dec 12, 2011 at 01:11, subin gangadharan
wrote:
> Hi All,
>
> I am reading about the barrier from linux kernel development.In this
> books, he says
> "On SMP kernels they are defined only as usual memory barriers.where
> as on UP kernels they are
> defined only as a compiler barrier
Hi All,
I am reading about the barrier from linux kernel development.In this
books, he says
"On SMP kernels they are defined only as usual memory barriers.where
as on UP kernels they are
defined only as a compiler barrier"
Does this mean in UP, processor won't reorder the instructions ?
Could pl
s no garentee for cpu2 to perceive int1 before int2.
you must add smp_rmb() inside cpu2 to prevent this.
two cpus must cooperate to acheive the sequence memory order.
> Date: Fri, 9 Dec 2011 14:14:37 +0530
> Subject: Re: Memory barrier
> From: trisha1ma...@gmail.com
> To: bu
.
>
> 2011/12/9 卜弋天 :
>> Hi :
>>
>> memory barriers can not make order on other cpus, only the current
>> cpu's order will be promised.
>>
>>
>>
>>> Date: Fri, 9 Dec 2011 12:54:40 +0530
>>> Subject: Memory barrier
>>> F
CONFIG_SMP, all SMP barriers are
converted into plain compiler barriers.
2011/12/9 卜弋天 :
> Hi :
>
> memory barriers can not make order on other cpus, only the current
> cpu's order will be promised.
>
>
>
>> Date: Fri, 9 Dec 2011 12:54:40 +0530
>> Subj
Hi :
memory barriers can not make order on other cpus, only the current cpu's
order will be promised.
> Date: Fri, 9 Dec 2011 12:54:40 +0530
> Subject: Memory barrier
> From: trisha1ma...@gmail.com
> To: Kernelnewbies@kernelnewbies.org
>
> Hi All,
>
&g
Hi All,
I need small clarification on memory barrier.
#define smp_mb() mb()
#define smp_rmb() rmb()
#define smp_wmb() wmb()
In case of SMP:
is smp_mb() or smp_rmb() make order on current CPU or all cpu's
Thanks
___
Kernelne
10 matches
Mail list logo