Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp785115img; Fri, 22 Mar 2019 08:30:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZ1+rFftIRnO0hvUfigbK/U0LEWCZKIun1dWc9vGjqlAMEQi770cUHytUDzgQjWGdsveFD X-Received: by 2002:a63:5259:: with SMTP id s25mr8953217pgl.230.1553268630517; Fri, 22 Mar 2019 08:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553268630; cv=none; d=google.com; s=arc-20160816; b=T0ouD5iKNgwdIIgU9Ad1ShNw3zbcKycqrhGNrDEYcacw5TUN26BxW35KtcAUq8Gg6L KYJT9xoh/ZO2jL2LYQjD1jbY+r4WCtE2u0uFtDwF8t+HLIyN5OEvaRRqNTbFG2RdiSxP fyKMhPE0ZtSxelNfdq+xkys/k0Zs3BBnjewQ6RJ/eDQ1DR70reksjzopDHSH1jJqaFGk ssnxrDFJ1iEA4ctDpkUaCNUgbCljdSt9PMvIuhyJ78hm6e4/F0Ql6IBY5ye9LZIyJHUR ChE3g+Vn9PT4mJMre3ABOdhrgpHcJ9UZUg8bnm3V0Uj4nybbPJxaDWx4at98Iw8poyVx T0vw== 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=dy4i8UpitEST1A4HCAxRqnnNXEnr0KtrRDYWb7MFUeM=; b=XGepsnWEN6TGrhzQFv3vp+ephDD7nRV1oARSszY0zntB7EeYzPUmExG4DDWFbIGBpw QtplegHHj/Taf/Zq0qndBtesYEEWSIcOWOkSXGqsNZ5KFJoEPIx3iociGdLAzef9yPQA uiTxHf6X2UFjSY7njoTtqT2cET1F/USdjSTdTwoF8nVSNdKC+2PP1I/lQXvd5rhZ0pkc GPzJRdHg6xM4XlCglH0HnjJaZfZAOPzRZP2h9hKDrh70zl/odtMhgAXp8Ayu4asRkKDQ 3GYB7v7hEA7mLW1l6le83rTAgjUW0nhsW2dvlm7ZWgtp0FRvRFroi9dZNN6XpTDZohuf 7cKg== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h37si7403398plb.93.2019.03.22.08.30.12; Fri, 22 Mar 2019 08:30:30 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727234AbfCVP30 (ORCPT + 99 others); Fri, 22 Mar 2019 11:29:26 -0400 Received: from mga09.intel.com ([134.134.136.24]:7722 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfCVP30 (ORCPT ); Fri, 22 Mar 2019 11:29:26 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2019 08:29:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="154833755" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by fmsmga004.fm.intel.com with ESMTP; 22 Mar 2019 08:29:24 -0700 Date: Fri, 22 Mar 2019 09:30:25 -0600 From: Keith Busch To: Felipe Franciosi Cc: Maxim Levitsky , Stefan Hajnoczi , Fam Zheng , "kvm@vger.kernel.org" , Wolfram Sang , "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Keith Busch , Kirti Wankhede , Mauro Carvalho Chehab , "Paul E . McKenney" , Christoph Hellwig , Sagi Grimberg , "Harris, James R" , Liang Cunming , Jens Axboe , Alex Williamson , Thanos Makatos , John Ferlan , Liu Changpeng , Greg Kroah-Hartman , Nicolas Ferre , Paolo Bonzini , Amnon Ilan , "David S . Miller" Subject: Re: Message-ID: <20190322153025.GA31194@localhost.localdomain> References: <20190319144116.400-1-mlevitsk@redhat.com> <488768D7-1396-4DD1-A648-C86E5CF7DB2F@nutanix.com> <42f444d22363bc747f4ad75e9f0c27b40a810631.camel@redhat.com> <20190321161239.GH31434@stefanha-x1.localdomain> <20190321162140.GA29342@localhost.localdomain> <8698ad583b1cfe86afc3d5440be630fc3e8e0680.camel@redhat.com> <0E8918CB-F679-4A5C-92AD-239E9CEC260C@nutanix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0E8918CB-F679-4A5C-92AD-239E9CEC260C@nutanix.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 07:54:50AM +0000, Felipe Franciosi wrote: > > > > Note though that SPDK doesn't support sharing the device between host and the > > guests, it takes over the nvme device, thus it makes the kernel nvme driver > > unbind from it. > > That is absolutely true. However, I find it not to be a problem in practice. > > Hypervisor products, specially those caring about performance, efficiency and fairness, will dedicate NVMe devices for a particular purpose (eg. vDisk storage, cache, metadata) and will not share these devices for other use cases. That's because these products want to deterministically control the performance aspects of the device, which you just cannot do if you are sharing the device with a subsystem you do not control. I don't know, it sounds like you've traded kernel syscalls for IPC, and I don't think one performs better than the other. > For scenarios where the device must be shared and such fine grained control is not required, it looks like using the kernel driver with io_uring offers very good performance with flexibility. NVMe's IO Determinism features provide fine grained control for shared devices. It's still uncommon to find hardware supporting that, though.