Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1036523imm; Wed, 17 Oct 2018 12:12:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV61RsnZHmPk/BsGjFgtRqk78AqBhpkBHhgkKzukD2I/Tm6vxHprg3i0cSYRX0bUN2Bz1Jwc6 X-Received: by 2002:a17:902:2e81:: with SMTP id r1-v6mr21028185plb.212.1539803559327; Wed, 17 Oct 2018 12:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539803559; cv=none; d=google.com; s=arc-20160816; b=tf8LQ/1i+CrX9TrE1zT4IGAy3t6X4btWbZUUifmYrO/FIXSbcPlLgH0sxLq8roWG43 3dufV4yXnW3aE/8Yg6NwDNoPyjWnK1DcC1LzMUNr5alB/yvkQxZaewy0NVnv+5P/0/Dx JYuJ2A3M+uLvooiU2AOaib4mq3CKqNuprGCvatBgLGBIo5dCHH4lWBabug/RCZulfz7H K8WEN2PWa3r5CqL9TJTXkA94hCUDAT7wGhxn0+z5GJqteJesmAFLttvECkMY/iVwRbqq 6WWEFloqz4wRliq2noOpz/DsVEbqYryJYLlyNbhIGY4dKL9dL1ZhY1WBMf0DWGasHvcT AVhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=AXAUdaIRvv36IfDgqF2F3vy4hCnDe2PzW1ADYzWHnlY=; b=rlsdVI4IpHuf7Tn/REL1/KLTxOMqC/wYF5pdue1+Ue78gzuPxZsvXEi1Jp0b/j2I69 1Q8ohTcnfNK/6jE3vQvAQBWrvmaz6YBlXd7DaweKQdeN8oZqGQD/Zg0SJkdN4hYRSaWY DEPQkB1izsU+jhu8wu0y3wOm1iT3Wn57IACnDVMKq28BgJ8AET+fPWp/0DyIXgjPyPZZ e8HiOp3MRLWrnuRJBl/+yah2F3dEvPXbYlmHKBE3DpxSXAXpzoJ9aTPlgOmeHwodt/k+ eLV80QTDmgu4cqj0Bfmnre3N6syEot2PbSpGuAI+/jPMD15xwB4sq2eS/4ZlSJN75nXM B0Iw== 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 t206-v6si3509805pgb.505.2018.10.17.12.12.23; Wed, 17 Oct 2018 12:12:39 -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 S1728338AbeJRDI6 (ORCPT + 99 others); Wed, 17 Oct 2018 23:08:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35722 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728111AbeJRDI6 (ORCPT ); Wed, 17 Oct 2018 23:08:58 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A90E53082E60; Wed, 17 Oct 2018 19:11:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B82FF1949B; Wed, 17 Oct 2018 19:11:51 +0000 (UTC) Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 973E64BB74; Wed, 17 Oct 2018 19:11:49 +0000 (UTC) Date: Wed, 17 Oct 2018 15:11:49 -0400 (EDT) From: Pankaj Gupta To: Dan Williams Cc: Kevin Wolf , Jan Kara , Xiao Guangrong , KVM list , Rik van Riel , linux-nvdimm , David Hildenbrand , Linux Kernel Mailing List , Dave Jiang , Qemu Developers , Christoph Hellwig , Vishal L Verma , Igor Mammedov , "Michael S. Tsirkin" , Stefan Hajnoczi , zwisler@kernel.org, lcapitulino@redhat.com, Paolo Bonzini , Nitesh Narayan Lal Message-ID: <431127218.21694133.1539803509205.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20181013050021.11962-1-pagupta@redhat.com> <20181013050021.11962-3-pagupta@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 2/2] virtio-pmem: Add virtio pmem driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.136, 10.4.195.4] Thread-Topic: virtio-pmem: Add virtio pmem driver Thread-Index: YyGiz7N3rzLKI9gm98sFjSpgz86qJg== X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 17 Oct 2018 19:11:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Fri, Oct 12, 2018 at 10:01 PM Pankaj Gupta wrote: > > > > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range information from > > Qemu over VIRTIO and registers it on nvdimm_bus. It also > > creates a nd_region object with the persistent memory > > range information so that existing 'nvdimm/pmem' driver > > can reserve this into system memory map. This way > > 'virtio-pmem' driver uses existing functionality of pmem > > driver to register persistent memory compatible for DAX > > capable filesystems. > > > > This also provides function to perform guest flush over > > VIRTIO from 'pmem' driver when userspace performs flush > > on DAX memory range. > > Before we can move forward with this driver we need additional > filesystem enabling to detect when the backing device is fronting DAX > pmem or a paravirtualized page cache through virtio-pmem. Any > interface that requires fsync() and a round trip to the hypervisor to > flush host page cache is not DAX. I saw your proposal[1] for new mmap flag MAP_DIRECT. IIUIC mapping should fail for MAP_DIRECT if it requires explicit flush or buffer indirection. So, if we disable MAP_SYNC flag for virtio-pmem this should fail MAP_DIRECT as well? Otherwise without MAP_DIRECT, virtio-pmem should be defaulted to VIRTIO flush mechanism. [1] https://marc.info/?l=linux-fsdevel&m=153953206330814&w=2 Thanks, Pankaj