Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp672092img; Wed, 20 Mar 2019 08:30:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQE3zcF089u3AQdAL2WwJjftMNljcSbpLMO8rCNuSkyJIc0oEIW4N/5cxUdEmnK4D254Lr X-Received: by 2002:a62:b25d:: with SMTP id x90mr12896032pfe.102.1553095845101; Wed, 20 Mar 2019 08:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553095845; cv=none; d=google.com; s=arc-20160816; b=QcbZF0SekiQS8zRAj3z6hGRWziwcT/0MZFhKBmbPOofLFA3r873zkErCL7v76aenNk t7lT6a1PPD9TvmECTngv5EV1rj5RTCg2AkUyfQNUm5j/B6gU88FCiiJSkzEyhX9k+8e4 D9yWWXtrWR2O9U5rN/8Anxu0xg3kGWVhqOVZYcme1VlR2Yf/yicYFTdhvFTXWXjcFceJ 9WKMXQbdgtBx8r7OwQOSYDNBK5NktjjK/p5NMDGTD8uss0V+GRaZcKzoviNuWd45fPiS G9f2Hr96Pa0SOvAzc71apAzrYngeFouHBijmpymu3/PXgbpOk0udAPDdZPh8Z1+kqsfQ AEnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=Wh/Uw0SWb+MxE+egEQfFnWIp64CPV/rY9t5VChZfLHw=; b=IHsLCusHJuODY/zlsIvhMprJen2PZA+iKFzvo+2LVyjdWNI3SQXsnUbC8jfsqdQNxA u5AKIujkcaGf8bKzIo7JVqKg5UoY5t1C3v3q9HcmFQt47+0VsHYUdd4MFiz/1udvGUIt mZ6zjnZFu6lcQZiFfIJSf4EOPeixSvEuHBCooPDN6ykkj1wlbeaa3KDW67IyZnnVsMY6 L2zX9pa79ykSlqirmwo4dcwabrGxYXGxLh5/yYg4dddCwCDUy1956/QiuhLwk+Y1eCAY +YMZeJck8Ma17pUbNn/COKx/v3KUYDX9N2gFDfeA8Ufvz2U8RFuvv8qXwm0xTU11TU0m 6v6w== 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 34si2053722plf.43.2019.03.20.08.30.29; Wed, 20 Mar 2019 08:30:45 -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 S1727620AbfCTP2K (ORCPT + 99 others); Wed, 20 Mar 2019 11:28:10 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43967 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726644AbfCTP2J (ORCPT ); Wed, 20 Mar 2019 11:28:09 -0400 Received: by mail-pf1-f195.google.com with SMTP id c8so2166576pfd.10; Wed, 20 Mar 2019 08:28:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=Wh/Uw0SWb+MxE+egEQfFnWIp64CPV/rY9t5VChZfLHw=; b=PF7rf4csU8yA85K3zj8/f19uZsfG2HhmqKdsEzj1VIpb28UMX3980ufuEVB3ZY3veZ w89QQZCyxT77eyS7wbKQztoDHUgjtgRQeRi/6H62EkJW24y/KfF/vxdnZZ0pIDu4Lhvg Y9aodNYsFzlGNfZVqi6pY6RqTXpjkVAHPg3d3jYVeDn+xNmEVPMOMe1ZKBZcnQhLL1Q3 e57UugK+CC1K2gmTUP9TWdEUceWWPOvlpyHSaKeOEwh9dzMpcdsXbRQwxuJDz1EELERX e7lKzz9sjxBea1s1StG9+GQwnUHecpxlymKY0Jm31/bMPQcIHW5cYGqqULhiVx0bMJ4R oQlw== X-Gm-Message-State: APjAAAVu6tkj+yHu0xyaiMnJeqrV5IiKdVubR1JQC6nnEvOfpr592eAI YL/3PyooXiBn6neEmFF2lZQ= X-Received: by 2002:a17:902:9a5:: with SMTP id 34mr8683295pln.287.1553095688848; Wed, 20 Mar 2019 08:28:08 -0700 (PDT) Received: from ?IPv6:2620:15c:2cd:203:5cdc:422c:7b28:ebb5? ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id h11sm2747295pgq.57.2019.03.20.08.28.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 08:28:07 -0700 (PDT) Message-ID: <1553095686.65329.36.camel@acm.org> Subject: Re: [PATCH 0/9] RFC: NVME VFIO mediated device From: Bart Van Assche To: Maxim Levitsky , linux-nvme@lists.infradead.org Cc: Fam Zheng , Keith Busch , Sagi Grimberg , kvm@vger.kernel.org, "David S . Miller" , Greg Kroah-Hartman , Liang Cunming , Wolfram Sang , linux-kernel@vger.kernel.org, Kirti Wankhede , Jens Axboe , Alex Williamson , John Ferlan , Mauro Carvalho Chehab , Paolo Bonzini , Liu Changpeng , "Paul E . McKenney" , Amnon Ilan , Christoph Hellwig , Nicolas Ferre Date: Wed, 20 Mar 2019 08:28:06 -0700 In-Reply-To: <20190319144116.400-1-mlevitsk@redhat.com> References: <20190319144116.400-1-mlevitsk@redhat.com> Content-Type: text/plain; charset="UTF-7" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-03-19 at 16:41 +-0200, Maxim Levitsky wrote: +AD4 +ACo All guest memory is mapped into the physical nvme device +AD4 but not 1:1 as vfio-pci would do this. +AD4 This allows very efficient DMA. +AD4 To support this, patch 2 adds ability for a mdev device to listen on +AD4 guest's memory map events. +AD4 Any such memory is immediately pinned and then DMA mapped. +AD4 (Support for fabric drivers where this is not possible exits too, +AD4 in which case the fabric driver will do its own DMA mapping) Does this mean that all guest memory is pinned all the time? If so, are you sure that's acceptable? Additionally, what is the performance overhead of the IOMMU notifier added by patch 8/9? How often was that notifier called per second in your tests and how much time was spent per call in the notifier callbacks? Thanks, Bart.