Thread (25 messages) 25 messages, 9 authors, 2003-01-30

Re: Linus rollup

From: Andrea Arcangeli <hidden>
Date: 2003-01-30 01:35:22

On Wed, Jan 29, 2003 at 05:27:43PM -0800, Andrew Morton wrote:
quoted hunk ↗ jump to hunk
@@ -82,11 +85,12 @@ static inline int fr_write_trylock(frloc
 
 	if (ret) {
 		++rw->pre_sequence;
-		wmb();
+		mb();
 	}
this isn't needed


if we hold the spinlock, the serialized memory can't be change under us,
so there's no need to put a read barrier, we only care that pre_sequence
is visible before the chagnes are visible and before post_sequence is
visible, hence only wmb() (after spin_lock and pre_sequence++) is
needed there and only rmb() is needed in the read-side.

Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help