From: Ferruh Yigit Subject: Re: [PATCH 2/2] net/mlx5: don't map doorbell register to write combining Date: Wed, 23 Aug 2017 12:03:39 +0100 Message-ID: <38d6d1e6-7e39-e0d6-863c-2b616f7cbe18@intel.com> References: <1503301622-14220-1-git-send-email-sagi@grimberg.me> <1503301622-14220-3-git-send-email-sagi@grimberg.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Nelio Laranjeiro , Adrien Mazarguil , Shahaf Shuler To: Sagi Grimberg , dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 689EB7D36 for ; Wed, 23 Aug 2017 13:03:45 +0200 (CEST) In-Reply-To: <1503301622-14220-3-git-send-email-sagi@grimberg.me> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 8/21/2017 8:47 AM, Sagi Grimberg wrote: > From: Shahaf Shuler > > By default, Verbs maps the doorbell register to write combining. > Working with write combining is useful for drivers which use blue flame > for the doorbell write. > > Since mlx5 PMD uses only doorbells and write combining mapping requires > an extra memory barrier to flush the doorbell after its write, setting > the mapping to un-cached by default. > > Such change is reduces the max and average round trip > latency significantly. > > Reported-by: Alexander Solganik > Signed-off-by: Shahaf Shuler > Signed-off-by: Yongseok Koh > Signed-off-by: Alexander Solganik > Signed-off-by: Sagi Grimberg > --- > drivers/net/mlx5/mlx5.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index b7e5046325c0..4c2a0b9652e3 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -920,6 +920,8 @@ rte_mlx5_pmd_init(void) > * using this PMD, which is not supported in forked processes. > */ > setenv("RDMAV_HUGEPAGES_SAFE", "1", 1); > + /* Don't map UAR to WC if BlueFlame is not used.*/ > + setenv("MLX5_SHUT_UP_BF", "1", 1); Although technically this is possible, I wonder how good idea it is a driver communicating with other processes via system environment variable? > ibv_fork_init(); > rte_pci_register(&mlx5_driver); > } >