From patchwork Mon Aug 23 00:09:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 62404 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0EC9BB70A7 for ; Mon, 23 Aug 2010 10:27:58 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751543Ab0HWA1y (ORCPT ); Sun, 22 Aug 2010 20:27:54 -0400 Received: from ozlabs.org ([203.10.76.45]:35042 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371Ab0HWA1x (ORCPT ); Sun, 22 Aug 2010 20:27:53 -0400 Received: by ozlabs.org (Postfix, from userid 1010) id 9C3B9B70AA; Mon, 23 Aug 2010 10:27:52 +1000 (EST) Message-Id: <20100823001238.849831193@samba.org> User-Agent: quilt/0.48-1 Date: Mon, 23 Aug 2010 10:09:36 +1000 From: Anton Blanchard To: brking@linux.vnet.ibm.com, santil@linux.vnet.ibm.com Cc: netdev@vger.kernel.org Subject: [patch 06/20] ibmveth: Use lighter weight read memory barrier in ibmveth_poll References: <20100823000930.546065833@samba.org> Content-Disposition: inline; filename=veth_barriers Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- -- 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 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++;