Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Segher Boessenkool
Date: Wednesday, August 15, 2007 - 7:07 pm

>> A volatile default would disable optimizations for atomic_read.

An atomic_read() implemented as a "normal" C variable read would
allow that read to be combined with another "normal" read from
that variable.  This could perhaps be marginally useful, although
I'd bet you cannot see it unless counting cycles on a simulator
or counting bits in the binary size.

With an asm() implementation, the compiler can not do this; with
a "volatile" implementation (either volatile variable or volatile-cast),
this invokes undefined behaviour (in both C and GCC).


Segher

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

Messages in current thread:
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Tue Aug 14, 3:31 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Tue Aug 14, 3:51 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Paul E. McKenney, (Wed Aug 15, 10:33 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Wed Aug 15, 11:31 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Paul E. McKenney, (Wed Aug 15, 11:45 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Paul E. McKenney, (Wed Aug 15, 12:07 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Wed Aug 15, 12:59 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Wed Aug 15, 1:42 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Wed Aug 15, 1:58 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Wed Aug 15, 2:07 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Wed Aug 15, 5:26 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Wed Aug 15, 5:40 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Wed Aug 15, 5:42 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Wed Aug 15, 5:59 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Wed Aug 15, 6:41 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Wed Aug 15, 7:07 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Wed Aug 15, 7:15 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Wed Aug 15, 7:17 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Thu Aug 16, 11:54 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Thu Aug 16, 12:39 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Thu Aug 16, 1:20 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Thu Aug 16, 1:50 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Thu Aug 16, 2:00 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Paul E. McKenney, (Thu Aug 16, 10:07 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 10:41 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Arjan van de Ven, (Fri Aug 17, 11:54 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Paul E. McKenney, (Fri Aug 17, 11:56 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Paul E. McKenney, (Fri Aug 17, 12:49 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 3:09 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 3:14 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 3:34 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 3:38 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 4:17 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 5:04 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 7:15 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Fri Aug 17, 10:18 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Mon Aug 20, 3:07 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Tue Aug 21, 7:59 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Fri Aug 24, 10:15 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Arjan van de Ven, (Mon Sep 10, 10:02 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Mon Sep 10, 11:59 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Mon Sep 10, 11:59 am)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Christoph Lameter, (Mon Sep 10, 2:36 pm)
Re: [PATCH 0/24] make atomic_read() behave consistently ac ..., Segher Boessenkool, (Mon Sep 10, 7:27 pm)
Re: [PATCH] Document non-semantics of atomic_read() and at ..., Christoph Lameter, (Tue Sep 11, 12:35 pm)