Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp378811imp; Wed, 20 Feb 2019 01:49:09 -0800 (PST) X-Google-Smtp-Source: AHgI3IYRO8L2LyUgYR37pAE9flhi0Cnha79qPfnIMjLEDQYbi+CHbF6Y+Ll6lkoXP2ovUCfMQE7A X-Received: by 2002:a17:902:a514:: with SMTP id s20mr25630367plq.242.1550656149929; Wed, 20 Feb 2019 01:49:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550656149; cv=none; d=google.com; s=arc-20160816; b=iYP8AnXDf0zgqcakoIlRer/nlaOJETgE3HEL+mz3OkVdi8G5b06MmJSD415G+PgLEE HRRtJdMjke1HnNgJpLP+DxV7ykpdglF6Gp4hIFVVOC5UE9cgLuoHJtn1Yp6QxMGkP8Fu OY1AAUspIyK7fhlopP+n/J8ZRJ+QghbeyQ1ImG2P4Hra9TWlIpdbr0G9a/+DEUXk+6rx izL5tGUJTtV9kr1XdAjj7tJZbAP3/4IAH8hSVEznZa/5pFLEhzAyj1ANbPGke7FnaiNa yjnhDoJ+NnIphBLxEbsIm7XWkKF6IAj6RK7Hn7nB6sAWyksKu2rAIuii8Odnr/P0GN04 NBCg== 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=6map5oEM4qoQQHsO/7vPfOt0fw+I/oRnB7gdsg5jO/E=; b=CehbXxXDCzTYFaVHO4w4Nj2L0AS0h7kN80qW+VS9B70ZQG+Jkq7Fwx3EDaXBqmKZfy UY1dnMtwDPey+AKbnj+LCry6KcRqjBC+WY2sl07ZwM+xGHuSCBraG5mzhQhJVHUVnFYb NKFFGHW4+ozXmx6Qx7xe5YxkHIqF3g4giYnd/5gMo7EqJgE6w79+s6VFFsBrMY7IwyGl ijUhgEj55DQP252hUX9U+qRzUcv2+IGnW0FYn9L6DntvZkKHsoW6hRiSBsJ/GYgx0aBW Xfb8Zti593cZDeDipSouyvM8LoYbiel5owHRiDzfRvL3/oaTYi2ltIljXYCwyK3YOFd5 Z63w== 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 t12si13435102plr.311.2019.02.20.01.48.54; Wed, 20 Feb 2019 01:49:09 -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 S1726990AbfBTJqo (ORCPT + 99 others); Wed, 20 Feb 2019 04:46:44 -0500 Received: from mgwym02.jp.fujitsu.com ([211.128.242.41]:47453 "EHLO mgwym02.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbfBTJqo (ORCPT ); Wed, 20 Feb 2019 04:46:44 -0500 Received: from yto-m1.gw.nic.fujitsu.com (unknown [192.168.229.100]) by mgwym02.jp.fujitsu.com with smtp id 2552_f23a_0aec060d_4551_4ae7_a4e5_e5f45beb343e; Wed, 20 Feb 2019 18:46:36 +0900 Received: from g01jpfmpwkw02.exch.g01.fujitsu.local (g01jpfmpwkw02.exch.g01.fujitsu.local [10.0.193.56]) by yto-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id BB29E40C7D21 for ; Wed, 20 Feb 2019 18:46:35 +0900 (JST) Received: from G01JPEXCHKW17.g01.fujitsu.local (G01JPEXCHKW17.g01.fujitsu.local [10.0.194.56]) by g01jpfmpwkw02.exch.g01.fujitsu.local (Postfix) with ESMTP id 57033328708; Wed, 20 Feb 2019 18:46:34 +0900 (JST) Received: from localhost (10.17.204.234) by G01JPEXCHKW17.g01.fujitsu.local (10.0.194.56) with Microsoft SMTP Server id 14.3.408.0; Wed, 20 Feb 2019 18:46:33 +0900 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: f6fcba2ed9eb4e9bb20547a14cb14f60 Date: Wed, 20 Feb 2019 18:46:11 +0900 From: Takao Indoh To: "Elliott, Robert (Persistent Memory)" CC: Keith Busch , Takao Indoh , "sagi@grimberg.me" , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "axboe@fb.com" , "hch@lst.de" Subject: Re: [PATCH] nvme: Enable acceleration feature of A64FX processor Message-ID: <20190220094610.GB3559@esprimo> References: <20190201124615.16107-1-indou.takao@jp.fujitsu.com> <20190201145414.GA22199@localhost.localdomain> <20190205124757.GA28465@esprimo> <20190205143905.GG22199@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 14, 2019 at 08:44:48PM +0000, Elliott, Robert (Persistent Memory) wrote: > > > > -----Original Message----- > > From: Linux-nvme [mailto:linux-nvme-bounces@lists.infradead.org] On Behalf Of Keith Busch > > Sent: Tuesday, February 5, 2019 8:39 AM > > To: Takao Indoh > > Cc: Takao Indoh ; sagi@grimberg.me; linux-kernel@vger.kernel.org; linux- > > nvme@lists.infradead.org; axboe@fb.com; hch@lst.de > > Subject: Re: [PATCH] nvme: Enable acceleration feature of A64FX processor > > > > On Tue, Feb 05, 2019 at 09:56:05PM +0900, Takao Indoh wrote: > > > 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. > > > > I think you're better of just purchasing devices that support the > > capability per spec rather than with a non-standard work around. > > > > The PCIe and NVMe specifications dosn't standardize a way to tell the device > when to use RO, which leads to system workarounds like this. > > The Enable Relaxed Ordering bit defined by PCIe tells the device when it > cannot use RO, but doesn't advise when it should or shall use RO. > > For SCSI Express (SOP+PQI), we were going to allow specifying these > on a per-command basis: > * TLP attributes (No Snoop, Relaxed Ordering, ID-based Ordering) > * TLP processing hints (Processing Hints and Steering Tags) > > to be used by the data transfers for the command. In some systems, one > setting per queue or per device might suffice. Transactions to the > queues and doorbells require stronger ordering. > > For this workaround: > * making an extra pass through the SGL to set the address bit is > inefficient; it should be done as the SGL is created. Thanks for your comment, do you mean this should be done in nvme_pci_setup_sgls()/nvme_pci_setup_prps()? > * why doesn't it support PRP Lists? This patch does not support PRP because PRP is used for small data and we cannot get enough performance improvement by this feature. But I can support PRP to improve performance of the device which is compliant with NVMe Spec 1.0 or does not support SGL. > * how does this interact with an iommu, if there is one? Must the > address with bit 56 also be granted permission, or is that > stripped off before any iommu comparisons? The latter. A bit 56 is cleared in Root Port before pass it to iommu. Thanks, Takao Indoh