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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stefan Richter
Date: Friday, August 17, 2007 - 3:48 am

Nick Piggin wrote:

"Indirect", "pretty direct"... It's subjective.

(It is not an API documentation; it is an implementation specification.)


Yes, but unlike these, atomic_read returns a value.

Without me (the API user) providing extra barriers, that value may
become something else whenever someone touches code in the vicinity of
the atomic_read.


You are right, atomic_read is not only different from accessors that
don't retunr values, it is also different from all other accessors that
return values (because they all also modify the value).  There is just
no actual API documentation, which contributes to the issue that some
people (or at least one: me) learn a little bit late how special
atomic_read is.


A lot of different though related issues are discussed in this thread,
but I personally am only occupied by one particular thing:  What kind of
return values do I get from atomic_read.


Probably good advice, like generally if driver guys consider lockless
algorithms.


OK, that's what I slowly realized during this discussion, and I
appreciate the explanations that were given here.


I could, or could not, if I were through with auditing the code.  I
remembered one case and posted it (nodemgr_host_thread) which was safe
because msleep_interruptible provided the necessary barrier there, and
this implicit barrier is not in danger to be removed by future patches.
-- 
Stefan Richter
-=====-=-=== =--- =---=
http://arcgraph.de/sr/
-
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 ..., Stefan Richter, (Fri Aug 17, 3:48 am)
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)