Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933226AbbFIOrE (ORCPT ); Tue, 9 Jun 2015 10:47:04 -0400 Received: from mailuogwhop.emc.com ([168.159.213.141]:41889 "EHLO mailuogwhop.emc.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933087AbbFIOpl (ORCPT ); Tue, 9 Jun 2015 10:45:41 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd02.lss.emc.com t59EjZMc028140 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd02.lss.emc.com t59EjZMc028140 From: Allen Hubbe To: linux-ntb@googlegroups.com Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Jon Mason , Dave Jiang Subject: [PATCH v3 15/18] NTB: Improve performance with write combining Date: Tue, 9 Jun 2015 05:44:42 -0400 Message-Id: X-Mailer: git-send-email 2.4.0.rc0.44.g244209c.dirty In-Reply-To: References: In-Reply-To: References: X-RSA-Classifications: Source Code, public X-Sentrion-Hostname: mailuogwprd02.lss.emc.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1833 Lines: 54 From: Dave Jiang Changing the memory window BAR mappings to write combining significantly boosts the performance. We will also use memcpy that utilizies non-temporal store which showed performance improement when doing non-cached memcpys. Signed-off-by: Dave Jiang --- drivers/ntb/ntb_transport.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c index dc14ec81c43e..528ea0af6d54 100644 --- a/drivers/ntb/ntb_transport.c +++ b/drivers/ntb/ntb_transport.c @@ -58,6 +58,7 @@ #include #include #include +#include #include "linux/ntb.h" #include "linux/ntb_transport.h" @@ -993,7 +994,7 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev) if (rc) goto err1; - mw->vbase = ioremap(mw->phys_addr, mw->phys_size); + mw->vbase = ioremap_wc(mw->phys_addr, mw->phys_size); if (!mw->vbase) { rc = -ENOMEM; goto err1; @@ -1375,7 +1376,11 @@ static void ntb_tx_copy_callback(void *data) static void ntb_memcpy_tx(struct ntb_queue_entry *entry, void __iomem *offset) { - memcpy_toio(offset, entry->buf, entry->len); + /* + * Using non-temporal mov to improve performance on non-cached + * writes. Even though we aren't actually copying from user space. + */ + __copy_from_user_inatomic_nocache(offset, entry->buf, entry->len); /* Ensure that the data is fully copied out before setting the flags */ wmb(); -- 2.4.0.rc0.43.gcf8a8c6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/