* memory barrier in UP
@ 2011-12-11 18:11 subin gangadharan
2011-12-12 17:16 ` Mulyadi Santosa
0 siblings, 1 reply; 4+ messages in thread
From: subin gangadharan @ 2011-12-11 18:11 UTC (permalink / raw)
To: kernelnewbies
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 please give any idea on this.
--
With Regards
Subin Gangadharan
I am not afraid and I am also not afraid of being afraid.
^ permalink raw reply [flat|nested] 4+ messages in thread
* memory barrier in UP
2011-12-11 18:11 memory barrier in UP subin gangadharan
@ 2011-12-12 17:16 ` Mulyadi Santosa
2011-12-12 18:57 ` subin gangadharan
0 siblings, 1 reply; 4+ messages in thread
From: Mulyadi Santosa @ 2011-12-12 17:16 UTC (permalink / raw)
To: kernelnewbies
Hi...
On Mon, Dec 12, 2011 at 01:11, subin gangadharan
<subingangadharan@gmail.com> 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"
>
> Does this mean in UP, processor won't reorder the instructions ?
In some arch like Alpha, loosely reordering even in UP could happen at
any time. But in x86 UP, IIRC there's only strict re-ordering, meaning
that every read is always fetching latest write etc.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* memory barrier in UP
2011-12-12 17:16 ` Mulyadi Santosa
@ 2011-12-12 18:57 ` subin gangadharan
2011-12-13 4:19 ` Mulyadi Santosa
0 siblings, 1 reply; 4+ messages in thread
From: subin gangadharan @ 2011-12-12 18:57 UTC (permalink / raw)
To: kernelnewbies
Hi Mulyadi,
Thanks for the answer.
On Mon, Dec 12, 2011 at 11:16 AM, Mulyadi Santosa
<mulyadi.santosa@gmail.com> wrote:
> Hi...
>
> On Mon, Dec 12, 2011 at 01:11, subin gangadharan
> <subingangadharan@gmail.com> 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"
>>
>> Does this mean in UP, processor won't reorder the instructions ?
>
> In some arch like Alpha, loosely reordering even in UP could happen at
> any time. But in x86 UP, IIRC there's only strict re-ordering, meaning
> that every read is always fetching latest write etc.
In that case (ALPHA), is compiler barrier sufficient enough to prevent
the re ordering done by the processor.
What I was thinking,compiler barrier is to instruct the compiler to
not do any re ordering.
Please correct me if I am wrong.
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
--
With Regards
Subin Gangadharan
I am not afraid and I am also not afraid of being afraid.
^ permalink raw reply [flat|nested] 4+ messages in thread
* memory barrier in UP
2011-12-12 18:57 ` subin gangadharan
@ 2011-12-13 4:19 ` Mulyadi Santosa
0 siblings, 0 replies; 4+ messages in thread
From: Mulyadi Santosa @ 2011-12-13 4:19 UTC (permalink / raw)
To: kernelnewbies
Hi Subin....
On Tue, Dec 13, 2011 at 01:57, subin gangadharan
<subingangadharan@gmail.com> 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,compiler barrier is to instruct the compiler to
> not do any re ordering.
Again this is architecture problem. I am not sure about Alpha, since I
only know about one compiler barrier that is "volatile". What I guess
is that in Alpha, it could be something else....maybe it is assembly
instruction like "lock" or something.
I remember there's an old Linuxjournal article that explains about it.
So to avoid further misunderstandings that I might bring, please
kindly read this article:
http://www.linuxjournal.com/article/8212
Hope that helps...
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-13 4:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-11 18:11 memory barrier in UP subin gangadharan
2011-12-12 17:16 ` Mulyadi Santosa
2011-12-12 18:57 ` subin gangadharan
2011-12-13 4:19 ` Mulyadi Santosa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).