Patchwork [06/20] ibmveth: Use lighter weight read memory barrier in ibmveth_poll

login
register
mail settings
Submitter Anton Blanchard
Date Aug. 23, 2010, 12:09 a.m.
Message ID <20100823001238.849831193@samba.org>
Download mbox | patch
Permalink /patch/62404/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Anton Blanchard - Aug. 23, 2010, 12:09 a.m.
We want to order the read in ibmveth_rxq_pending_buffer and the read of
ibmveth_rxq_buffer_valid which are both cacheable memory. smp_rmb() is good
enough for this.

Signed-off-by: Anton Blanchard <anton@samba.org>
---



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: net-next-2.6/drivers/net/ibmveth.c
===================================================================
--- net-next-2.6.orig/drivers/net/ibmveth.c	2010-08-23 08:52:29.793789816 +1000
+++ net-next-2.6/drivers/net/ibmveth.c	2010-08-23 08:52:30.283755038 +1000
@@ -1010,7 +1010,7 @@  static int ibmveth_poll(struct napi_stru
 		if (!ibmveth_rxq_pending_buffer(adapter))
 			break;
 
-		rmb();
+		smp_rmb();
 		if (!ibmveth_rxq_buffer_valid(adapter)) {
 			wmb(); /* suggested by larson1 */
 			adapter->rx_invalid_buffer++;