Re: [PATCH 1/23] document preferred use of volatile with atomic_t

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Segher Boessenkool
Date: Thursday, August 16, 2007 - 2:36 pm

> But barriers force a flush of *everything* in scope,

Nonsense, whatever "flush" is supposed to mean here.


Puh-lease.  I DO NOT DISTRUST THE COMPILER, I just don't assume
it will do whatever I would like it to do without telling it.
It's a machine you know, and it is very well documented.

(And most barriers don't (need to) use volatile).

Implementing the atomic ops in asm loses exactly *no* semantics,
and it doesn't add restrictions either; it does allow you however
to access an atomic_t with normal loads/stores independently, if
you so choose.  The only valid issue brought up so far is Russell
King's comment that GCC cannot schedule the machine instructions
in and around an asm() perfectly, it doesn't look inside the asm()
after all; but the situation isn't quite as sever as he suggests
(GCC _does_ know you are performing loads/stores, etc.); more about
that later, when I've finished researching the current state of
that stuff.


Segher

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [PATCH 10/23] make atomic_read() and atomic_set() beha ..., Christoph Lameter, (Tue Aug 14, 3:11 pm)
Re: [PATCH 1/23] document preferred use of volatile with a ..., Christoph Lameter, (Tue Aug 14, 3:45 pm)
Re: [PATCH 1/23] document preferred use of volatile with a ..., Christoph Lameter, (Tue Aug 14, 3:56 pm)
Re: [PATCH 1/23] document preferred use of volatile with a ..., Segher Boessenkool, (Thu Aug 16, 2:36 pm)
Re: [PATCH 11/23] make atomic_read() and atomic_set() beha ..., Segher Boessenkool, (Wed Aug 22, 7:24 am)
Re: [PATCH 11/23] make atomic_read() and atomic_set() beha ..., Segher Boessenkool, (Thu Aug 23, 12:29 pm)