2006-11-06 14:01:20

by Oleg Nesterov

[permalink] [raw]
Subject: [PATCH] a minor fix for set_mb() in Documentation/memory-barriers.txt

set_mb() is used by set_current_state() which needs mb(), not wmb().
I think it would be right to assume that set_mb() implies mb(), all
arches seem to do just this.

Signed-off-by: Oleg Nesterov <[email protected]>

--- d/Documentation/memory-barriers.txt~ 2006-11-06 17:43:36.000000000 +0300
+++ d/Documentation/memory-barriers.txt 2006-11-06 17:44:26.000000000 +0300
@@ -1016,7 +1016,7 @@ There are some more advanced barrier fun

(*) set_mb(var, value)

- This assigns the value to the variable and then inserts at least a write
+ This assigns the value to the variable and then inserts a full memory
barrier after it, depending on the function. It isn't guaranteed to
insert anything more than a compiler barrier in a UP compilation.



2006-11-08 11:31:07

by David Howells

[permalink] [raw]
Subject: Re: [PATCH] a minor fix for set_mb() in Documentation/memory-barriers.txt

Oleg Nesterov <[email protected]> wrote:

> set_mb() is used by set_current_state() which needs mb(), not wmb().
> I think it would be right to assume that set_mb() implies mb(), all
> arches seem to do just this.

Yes, you're right. Copy'n'paste error from the text about set_wmb() I think.

Acked-By: David Howells <[email protected]>