Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2711653yba; Mon, 8 Apr 2019 03:05:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMTf4bZT65IhBAaBndCRwWAorkWYXozRMJeMN7jqpq/mtXMnA8aCnjHbUF4xnonKeMSQMt X-Received: by 2002:a17:902:364:: with SMTP id 91mr18173659pld.72.1554717909506; Mon, 08 Apr 2019 03:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554717909; cv=none; d=google.com; s=arc-20160816; b=I9j5ogG6OaNVnPWPqZOq8cN7z9WhSStJYWop8D6G43pgQACtppDdSkYQpfoDJ+0av8 sY8uc2N0sLE8rv77yWKOv9ZfLNLQmzziUW5zSnwSlqvRkAUbSXbcfJCJimxGhXEHQ2du DyVPTQ2e51rOrrLoFg8O39bsa7fHVzdTnFE4CljFIe8yKR1nITPUC9FsAGIhIfyjfKah zl7ybHfRdiegwn0uAHPx7Qkw3YvDJDqiqj76n/LymXf8KnNy9KNPvoXTLIT4H/xnwhEr neJ3Ne0gahby/04c7nODTCUVSjeqr0IQOxbuFLCqqOut1LbY7nSV2t5h/lj1kdA/4dV3 CrJQ== 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=CiLsP3NcIJdqEhViAXwQCdHKxZKxdu5cjpf08lRuX+E=; b=MXVBWFzd5eJCpTiSJksNy1b5Lsj1TPjbCO3aR8JaPxVwajZTNS57i2OhIn/DsP98qV wjDoK43L5OliWKWzt/oI0eCa0Q09/L6hiemglViCE7mcflX9Vj6I31fiNtmqfTlpg1kn oxxkK9uTAcUMVOBCLAPhgqxmwrnmsa9iMFuX3FG6uLTX7xS9xKpKO1CmA76uhG/W3QQV uTPc66O4t7ECPns998EoGuWY+QyIIAxvpjBBF7yiEb+Mi7YuNbRhbDcYXllzMmc/LbZI dhbwunSmiJeoyNKM3I+a4efJSrjSzW6aQs+kLyTcVgXWILDdImPlDjRmq7RekUG+zy0q 6cbA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si21377405plk.237.2019.04.08.03.04.54; Mon, 08 Apr 2019 03:05:09 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726517AbfDHKEN (ORCPT + 99 others); Mon, 8 Apr 2019 06:04:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42930 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbfDHKEN (ORCPT ); Mon, 8 Apr 2019 06:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C46730027B5; Mon, 8 Apr 2019 10:04:12 +0000 (UTC) Received: from maximlenovopc.usersys.redhat.com (unknown [10.35.206.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5042B60471; Mon, 8 Apr 2019 10:04:05 +0000 (UTC) Message-ID: <4a3d473c8f671d59c57ec26ff5ec0879ad38bf9a.camel@redhat.com> Subject: Re: your mail From: Maxim Levitsky To: Keith Busch Cc: Fam Zheng , Keith Busch , Sagi Grimberg , kvm@vger.kernel.org, Wolfram Sang , Greg Kroah-Hartman , Liang Cunming , Nicolas Ferre , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, "David S . Miller" , Jens Axboe , Alex Williamson , Kirti Wankhede , Mauro Carvalho Chehab , Paolo Bonzini , Liu Changpeng , "Paul E . McKenney" , Amnon Ilan , Christoph Hellwig , John Ferlan Date: Mon, 08 Apr 2019 13:04:03 +0300 In-Reply-To: <20190319152212.GC24176@localhost.localdomain> References: <20190319144116.400-1-mlevitsk@redhat.com> <20190319152212.GC24176@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 08 Apr 2019 10:04:12 +0000 (UTC) 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 09:22 -0600, Keith Busch wrote: > On Tue, Mar 19, 2019 at 04:41:07PM +0200, Maxim Levitsky wrote: > > -> Share the NVMe device between host and guest. > > Even in fully virtualized configurations, > > some partitions of nvme device could be used by guests as block > > devices > > while others passed through with nvme-mdev to achieve balance between > > all features of full IO stack emulation and performance. > > > > -> NVME-MDEV is a bit faster due to the fact that in-kernel driver > > can send interrupts to the guest directly without a context > > switch that can be expensive due to meltdown mitigation. > > > > -> Is able to utilize interrupts to get reasonable performance. > > This is only implemented > > as a proof of concept and not included in the patches, > > but interrupt driven mode shows reasonable performance > > > > -> This is a framework that later can be used to support NVMe devices > > with more of the IO virtualization built-in > > (IOMMU with PASID support coupled with device that supports it) > > Would be very interested to see the PASID support. You wouldn't even > need to mediate the IO doorbells or translations if assigning entire > namespaces, and should be much faster than the shadow doorbells. > > I think you should send 6/9 "nvme/pci: init shadow doorbell after each > reset" separately for immediate inclusion. > > I like the idea in principle, but it will take me a little time to get > through reviewing your implementation. I would have guessed we could > have leveraged something from the existing nvme/target for the mediating > controller register access and admin commands. Maybe even start with > implementing an nvme passthrough namespace target type (we currently > have block and file). Hi! Sorry to bother you, but any update? I was somewhat sick for the last week, now finally back in shape to continue working on this and other tasks I have. I am studing now the nvme target code and the io_uring to evaluate the difficultiy of using something similiar to talk to the block device instead of / in addtion to the direct connection I implemented. I would be glad to hear more feedback on this project. I will also soon post the few fixes separately as you suggested. Best regards, Maxim Levitskky