Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964775AbbFIQq7 (ORCPT ); Tue, 9 Jun 2015 12:46:59 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:36173 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933361AbbFIQqm (ORCPT ); Tue, 9 Jun 2015 12:46:42 -0400 Date: Tue, 9 Jun 2015 11:46:32 -0500 From: Bjorn Helgaas To: Allen Hubbe Cc: linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Jon Mason , Dave Jiang Subject: Re: [PATCH v3 15/18] NTB: Improve performance with write combining Message-ID: <20150609164632.GG23119@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2359 Lines: 69 On Tue, Jun 09, 2015 at 05:44:42AM -0400, Allen Hubbe wrote: > From: Dave Jiang > > Changing the memory window BAR mappings to write combining significantly > boosts the performance. We will also use memcpy that utilizies s/utilizies/uses/ > non-temporal store which showed performance improement when doing s/improement/improvement/ > 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); __copy_from_user_inatomic_nocache() only exists on x86, but this file looks like it's intended to be arch-agnostic? > > /* 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-pci" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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/