Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5034432ima; Tue, 5 Feb 2019 05:27:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IZYWITucgQdF8fZiJ8mbvgQ5Dtjn5BCj5oJetgTUMKKw63+qwUbWa8Mee2chC5mCWhlKmDc X-Received: by 2002:a62:e30d:: with SMTP id g13mr4959775pfh.151.1549373247519; Tue, 05 Feb 2019 05:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549373247; cv=none; d=google.com; s=arc-20160816; b=csH4rqJc7XEoX88p5v6afLtU/f3EQSvBhrCxcGu0bhRGrdJn0iQLRlLsq7jmS1tAbI HzwOR0AWcdcwgZ6ZvGBDugUNKSBQ9KSYxUtv3cAT9umhr3IqnwhA+ypVxkjIOaSvWUKk +TSU+7MWOtWOmKwfT7tdbIVXcYT306SRvHkCKuUNv/ejiwtX/tePyrDBvkbxwcpXy9CI cp2r8AO9e91gpzvZG6JpM1Aae+Lwsyi+e2zqiB+qa49qIFDitcwpub3RmWildeYt1zHZ yLNP8j+rgX+32GxYwb95ytjQnbTeXzkLTByxRM8lqYHryREOYQ5FPy2mPPEA6vSKpCer 9brw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=CcAfy1shJL/aDU1kxNMOGL7hvnCdS3wQCVXi01OyjjI=; b=Db9nSYkUPiYVXmsOKcdJXrtKEoUEeRFCw4EzYMGFsq4tBAPvs07pHdxr1xuy28wdX+ WbiyAMOVxjVYjNhuxC5dde7nN4mLeuUrklbJlIePmDJvIHxvNUQMthKusqbe10QcOdk9 fjzRuGLSpcaq9Kn8gPw2d2yp/X54mqLdiY28KTpdndT9ads6kwSwgaX0lFLU1P+MQVTF DFOPZ05nKPYoqxGv7geW6scPDANuj+bdmFOy3kWlkQnM+bW+7Nup9Mu+TK2TWoPZPd2W sRrFjvyRCuGpWbshOdqae5Ith5P97KfYNAYJ1Q83sMk5DyG2agAfWH5lxcMH9Eg/WUSn QYqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16si2925844pgj.203.2019.02.05.05.27.11; Tue, 05 Feb 2019 05:27:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729090AbfBENHi (ORCPT + 99 others); Tue, 5 Feb 2019 08:07:38 -0500 Received: from mgwkm02.jp.fujitsu.com ([202.219.69.169]:13623 "EHLO mgwkm02.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbfBENHi (ORCPT ); Tue, 5 Feb 2019 08:07:38 -0500 X-Greylist: delayed 672 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Feb 2019 08:07:37 EST Received: from kw-mxoi1.gw.nic.fujitsu.com (unknown [192.168.231.131]) by mgwkm02.jp.fujitsu.com with smtp id 24f1_25cb_8164ddb1_ce26_48c2_bc08_dab2ac880630; Tue, 05 Feb 2019 21:56:20 +0900 Received: from g01jpfmpwyt03.exch.g01.fujitsu.local (g01jpfmpwyt03.exch.g01.fujitsu.local [10.128.193.57]) by kw-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id C8073AC013C for ; Tue, 5 Feb 2019 21:56:20 +0900 (JST) Received: from G01JPEXCHYT18.g01.fujitsu.local (G01JPEXCHYT18.g01.fujitsu.local [10.128.194.57]) by g01jpfmpwyt03.exch.g01.fujitsu.local (Postfix) with ESMTP id BBD3546E683; Tue, 5 Feb 2019 21:56:19 +0900 (JST) Received: from localhost (10.17.204.234) by G01JPEXCHYT18.g01.fujitsu.local (10.128.194.57) with Microsoft SMTP Server id 14.3.408.0; Tue, 5 Feb 2019 21:56:19 +0900 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: 2f5c2cdb5aed4922b1b5e740c2cf4f28 Date: Tue, 5 Feb 2019 21:56:05 +0900 From: Takao Indoh To: Keith Busch CC: Takao Indoh , , , , , Subject: Re: [PATCH] nvme: Enable acceleration feature of A64FX processor Message-ID: <20190205124757.GA28465@esprimo> References: <20190201124615.16107-1-indou.takao@jp.fujitsu.com> <20190201145414.GA22199@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190201145414.GA22199@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 01, 2019 at 07:54:14AM -0700, Keith Busch wrote: > On Fri, Feb 01, 2019 at 09:46:15PM +0900, Takao Indoh wrote: > > From: Takao Indoh > > > > Fujitsu A64FX processor has a feature to accelerate data transfer of > > internal bus by relaxed ordering. It is enabled when the bit 56 of dma > > address is set to 1. > > Wait, what? RO is a standard PCIe TLP attribute. Why would we need this? I should have explained this patch more carefully. Standard PCIe devices can use Relaxed Ordering (RO) by setting Attr field in the TLP header, however, this mechanism cannot be utilized if the device does not support RO feature. Fujitsu A64FX processor has an alternate feature to enable RO in its Root Port by setting the bit 56 of DMA address. This mechanism enables to utilize RO feature even if the device does not support standard PCIe RO. The data packet with its DMA address bit 56 is set, is transferred from the device to the PCI root port with Strong Ordering (SO), and then it is transferred with RO to the host memory. This patch adds new code into NVMe driver to set bit 56 of DMA address to utilize this feature. The reason why I do this in NVMe driver is that here is an only place where we can traverses a sgl list to update the DMA addresses. We can transfer data buffers with RO, but we cannot use RO as for writes to the admin completion queue and the I/O completion queue from the NVMe controller to the host. These writes need to be done with SO to avoid data corruption. This patch scans data buffers queued in the sgl list and update their DMA addresses to send data buffers with RO. Thanks, Takao Indoh