Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3520602imm; Mon, 6 Aug 2018 06:18:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcr28AEOtcTUICAi8xvjuRUzaOUMjSsMdRs9JYaXRGHXn9P7yoozXPf0alva0zetTOoDDHa X-Received: by 2002:a17:902:bb85:: with SMTP id m5-v6mr427566pls.46.1533561529651; Mon, 06 Aug 2018 06:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533561529; cv=none; d=google.com; s=arc-20160816; b=nb/FdaEY567D/OrLYz47+FwoPc0O1Hl+k3FVIj1ZA3OJdBT64qaP1WOrdIYUrBO0Kp 45CXR6pFqAjjG5jPaeRZ8CBlrdQRCWVYXCZuci5uwR5/z87Cwq5ps+YtFcLcGLUhvbqU fWFljEkHruz1bHJMv1uaxHfONp4kjLyLpSYyy0n66avhnNDl5LrWtAu23PUzrH5DjN// xc5iRgEc6I4dtW9QEdttJlC/lOV0uh0gyI8yxtyM4q265IHo4L/fZEJKirD05p2OPsw1 mWNvH0kEsYejXLGvnufnwisR7UwidpfzsSaXQ63cPj672fU6S4qGNF0U2Els9tvVCyVq LsXg== 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:arc-authentication-results; bh=1UHqU+VW3m2p/x111Qznougn91S95/p6JuxgM3+VyCc=; b=GvGNR5OF+gypPRyNSOuFZ5P4vAgN6mq6tpgfyF7/I9CNfXtNuGsVW/k2DUXMmxOBTQ mGBqea7NXj06nekQH+C5O2mky0dpN1JCH3Jr5VW1c6rCzrUd0+FJ+IlcqVtqQLLTWe9x kxNEAgPxvmccHU/WIGcvK7Hl0bpq0fhsR+gw74Tr9KE2gbT3A/1zxrDvdldT+ebeakqm kjw8/FZ++6qar233FDHkitzScwgrDE6GWylm0i6HOb0tfcWAA4mv/kLkGrD8Qg644qYj 6Pv6MzYnImnaOZ45uNW80mrrulssVuXRF4PSLPLQPjqLyhgKySrS2Hjfc7F6Q4GkvFL8 SaQw== 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 d10-v6si12205885pgg.341.2018.08.06.06.18.34; Mon, 06 Aug 2018 06:18:49 -0700 (PDT) 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 S1730245AbeHFOga (ORCPT + 99 others); Mon, 6 Aug 2018 10:36:30 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:36777 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726901AbeHFOga (ORCPT ); Mon, 6 Aug 2018 10:36:30 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 5D0C8806AF; Mon, 6 Aug 2018 14:27:34 +0200 (CEST) Date: Mon, 6 Aug 2018 14:27:33 +0200 From: Pavel Machek To: Kenneth Lee Cc: Jonathan Corbet , Herbert Xu , "David S . Miller" , Joerg Roedel , Alex Williamson , Kenneth Lee , Hao Fang , Zhou Wang , Zaibo Xu , Philippe Ombredanne , Greg Kroah-Hartman , Thomas Gleixner , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org, kvm@vger.kernel.org, linux-accelerators@lists.ozlabs.org, Lu Baolu , Sanjay Kumar , linuxarm@huawei.com Subject: Re: [RFC PATCH 1/7] vfio/spimdev: Add documents for WarpDrive framework Message-ID: <20180806122733.GA17232@xo-6d-61-c0.localdomain> References: <20180801102221.5308-1-nek.in.cn@gmail.com> <20180801102221.5308-2-nek.in.cn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180801102221.5308-2-nek.in.cn@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > WarpDrive is a common user space accelerator framework. Its main component > in Kernel is called spimdev, Share Parent IOMMU Mediated Device. It exposes spimdev is really unfortunate name. It looks like it has something to do with SPI, but it does not. > +++ b/Documentation/warpdrive/warpdrive.rst > @@ -0,0 +1,153 @@ > +Introduction of WarpDrive > +========================= > + > +*WarpDrive* is a general accelerator framework built on top of vfio. > +It can be taken as a light weight virtual function, which you can use without > +*SR-IOV* like facility and can be shared among multiple processes. > + > +It can be used as the quick channel for accelerators, network adaptors or > +other hardware in user space. It can make some implementation simpler. E.g. > +you can reuse most of the *netdev* driver and just share some ring buffer to > +the user space driver for *DPDK* or *ODP*. Or you can combine the RSA > +accelerator with the *netdev* in the user space as a Web reversed proxy, etc. What is DPDK? ODP? > +How does it work > +================ > + > +*WarpDrive* takes the Hardware Accelerator as a heterogeneous processor which > +can share some load for the CPU: > + > +.. image:: wd.svg > + :alt: This is a .svg image, if your browser cannot show it, > + try to download and view it locally > + > +So it provides the capability to the user application to: > + > +1. Send request to the hardware > +2. Share memory with the application and other accelerators > + > +These requirements can be fulfilled by VFIO if the accelerator can serve each > +application with a separated Virtual Function. But a *SR-IOV* like VF (we will > +call it *HVF* hereinafter) design is too heavy for the accelerator which > +service thousands of processes. VFIO? VF? HVF? Also "gup" might be worth spelling out. > +References > +========== > +.. [1] Accroding to the comment in in mm/gup.c, The *gup* is only safe within > + a syscall. Because it can only keep the physical memory in place > + without making sure the VMA will always point to it. Maybe we should > + raise the VM_PINNED patchset (see > + https://lists.gt.net/linux/kernel/1931993) again to solve this probl I went through the docs, but I still don't know what it does. Pavel