Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5036074ima; Tue, 5 Feb 2019 05:29:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IY3+ADhGsKfHJDgqlWMeQJjiq9OiMk/cdbpgHiQf18QRp7R7WYsi5yrAoMfsutKKXzn57dk X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr5206197plr.128.1549373348556; Tue, 05 Feb 2019 05:29:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549373348; cv=none; d=google.com; s=arc-20160816; b=nkFB6hu14vbU5x5mbKeGkT6KlXrFTAjGlxGwF29l4oHQWY175ACeGBjFs936+hxuNQ xMMgP8qBszcamZ/NUnuMeUmgV4bhUbzooaXiR7GyFpWALU4Jo5pNMG7rs9HpnjMYeyAb 2tzfBQ+TNR/G8PFZWgS4PLgnx4SwrMgJaDsFn+xuih9ah3HHInGgJxVRdlu8lJKr2r1w WWNFbwbilaKLB8PLzEGdVaOMoFBcSuXIFu47HdCaULAaQqfgbmyIk4SlJkVaH9uovKc2 4cEJrYw87ZGXaHuHdV5M8Qs3Eb8s8Io9zYkOIrivqLVLb/gusCQJKcSwflg+gbQ8EyMc BJJQ== 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=Y+WqL1cfbr41moxBJn2gLmrxNpL3k+Q0dyC3nCqGVS8=; b=KmiovmiRz0dxUYLW1Mdsr4OTRuEulVzxvbI0XuxAJ3OgASU9cBnuhIoRfU9ci6FJAw jD73Tlr8NPpyHeFSBbrzCpXl0CJWBkgFyvnoJ0dYfKWoglgV9kJ8zZZzlU0TEvZqVieU 9qGJqQuRJajmix9PPSafXZvhG/NKPpN5bhbn0yFdLGSOb9V9gXuWXjlUbAssU4x+yW9B TVh/TWx17nFFdNYxjQCCGPMfSRlZy6tPZQeS/6bUE4Js67lMjFCc1hbndcCEKh7a4zYP fWTtCGHfBl8y+vobX78FeCM/JExsKwswmn7NY3Z0fFNfFse342Wz7UlB/K+Iwq6BmmDC 2CDQ== 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 j6si3210934pfc.57.2019.02.05.05.28.51; Tue, 05 Feb 2019 05:29:08 -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 S1729174AbfBENIY (ORCPT + 99 others); Tue, 5 Feb 2019 08:08:24 -0500 Received: from mgwkm04.jp.fujitsu.com ([202.219.69.171]:55966 "EHLO mgwkm04.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbfBENIX (ORCPT ); Tue, 5 Feb 2019 08:08:23 -0500 Received: from kw-mxoi1.gw.nic.fujitsu.com (unknown [192.168.231.131]) by mgwkm04.jp.fujitsu.com with smtp id 26ad_3365_5142da88_77db_49b8_beb9_0307d4f1880e; Tue, 05 Feb 2019 21:57:08 +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 EB3ADAC0128 for ; Tue, 5 Feb 2019 21:57:07 +0900 (JST) Received: from G01JPEXCHYT14.g01.fujitsu.local (G01JPEXCHYT14.g01.fujitsu.local [10.128.194.53]) by g01jpfmpwyt03.exch.g01.fujitsu.local (Postfix) with ESMTP id DB20746E683; Tue, 5 Feb 2019 21:57:06 +0900 (JST) Received: from localhost (10.17.204.234) by G01JPEXCHYT14.g01.fujitsu.local (10.128.194.53) with Microsoft SMTP Server id 14.3.408.0; Tue, 5 Feb 2019 21:57:06 +0900 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: 8c523e3756ff4cee9106862fcbfb4adb Date: Tue, 5 Feb 2019 21:56:57 +0900 From: Takao Indoh To: Christoph Hellwig CC: Takao Indoh , , , , , Subject: Re: [PATCH] nvme: Enable acceleration feature of A64FX processor Message-ID: <20190205125657.GA1663@esprimo> References: <20190201124615.16107-1-indou.takao@jp.fujitsu.com> <20190201155120.GA5180@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190201155120.GA5180@lst.de> 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 04:51:20PM +0100, Christoph Hellwig 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. > > > > This patch introduces this acceleration feature to the NVMe driver to > > enhance NVMe device performance. > > This has absolutely no business in a PCIe driver, sorry. > At first let me explain detail of this feature. I wrote the same explanation in the reply to Keith, but I write here again just in case. 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