Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3221519imm; Sun, 3 Jun 2018 22:58:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI7yLwz9FXyHTQ3hYwEqAE3nV/SeueTDIdWSRwlS+y64EtFX1gEsbtBxHmN/iABDy4Qdlwr X-Received: by 2002:a62:6a0a:: with SMTP id f10-v6mr19724015pfc.99.1528091939794; Sun, 03 Jun 2018 22:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528091939; cv=none; d=google.com; s=arc-20160816; b=nIs21qavk0LtWQSPClUlnyfYwslzAmORorFsbj+M8wivx5dqhy5Bt6DHOxOhrW/Tb7 TLvSvR9llK20xOqZfFGOhZ2PZ5rVJD0DA54EzwZ+MAWmJpAcxRBP51UBoArluCsdqxJt 2a4hLToq+02k1GbUXERSBMMi5zDUlnpJN97fuHr+mIHhyKON40zWQMt//UWLHmLHR0Rx vkARPVAvS6JJfera30xCkXKtDEXm4W9m/utn2EtHZ2YnbmOu6pTui1LKpH4SPN00GYtL 0h/bvJpt1Q0KfFHXyDkfIjct6dgfxiMlfKV3g4WZLK+xm6tXUudDtqd0q9yBU7/4WWnW DDFA== 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:arc-authentication-results; bh=2nrz13PXi1zEZdGruBr3EMklwJSosvGkiXJ5Q/Ns6Bk=; b=RFLL8cp7zgzBRMCm+qwmeKYQaRHVrKNDNR7fSLyxntvBCAk994aD0ZmhOpNRasPKVy EaNBpmmpUwVoCNrH9/eScyalKEc5Alo4iOgepymrEEGfgotuTw7s5BW7WfwkPqrfIk9X lh9jE39fAxrPIunl66vLPjQzxmJe1MQuHNEkjJfMgLDcVCdHbHM16T0sNrk3g5dQt9/a gNdWKqXTjQqHr3QbTjBt1jpFJVLHbIi7WIqRf+JSr2Jddr2HAIWXEKaZz+LbBLTQ6YtD EOGOK4kXmOdaWR8PC7/HueQhTPc9JJ3lrRQs4t26IF+1ACmI5pPTTUUZJyuPsN3Z9coL oaUQ== 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 m21-v6si22328708pls.217.2018.06.03.22.58.45; Sun, 03 Jun 2018 22:58:59 -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 S1751830AbeFDF5C (ORCPT + 99 others); Mon, 4 Jun 2018 01:57:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56064 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751784AbeFDF5A (ORCPT ); Mon, 4 Jun 2018 01:57:00 -0400 Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5912B8BD26; Mon, 4 Jun 2018 05:57:00 +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 2ECF130012C9; Mon, 4 Jun 2018 05:56:56 +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 D5B6C4BB78; Mon, 4 Jun 2018 05:56:55 +0000 (UTC) Date: Mon, 4 Jun 2018 01:56:55 -0400 (EDT) From: Pankaj Gupta To: Igor Mammedov Cc: kwolf@redhat.com, haozhong zhang , nilal@redhat.com, jack@suse.cz, xiaoguangrong eric , kvm@vger.kernel.org, riel@surriel.com, linux-nvdimm@ml01.01.org, david@redhat.com, ross zwisler , linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, hch@infradead.org, linux-mm@kvack.org, mst@redhat.com, stefanha@redhat.com, niteshnarayanlal@hotmail.com, marcel@redhat.com, pbonzini@redhat.com, dan j williams , lcapitulino@redhat.com Message-ID: <1227242806.39629768.1528091815515.JavaMail.zimbra@redhat.com> In-Reply-To: <20180601142410.5c986f13@redhat.com> References: <20180425112415.12327-1-pagupta@redhat.com> <20180601142410.5c986f13@redhat.com> Subject: Re: [Qemu-devel] [RFC v2 0/2] kvm "fake DAX" device flushing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.123, 10.4.195.9] Thread-Topic: kvm "fake DAX" device flushing Thread-Index: mEJH5NakvargHSZGbxwQ534cikNvgg== X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 04 Jun 2018 05:57:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Igor, > > [...] > > - Qemu virtio-pmem device > > It exposes a persistent memory range to KVM guest which > > at host side is file backed memory and works as persistent > > memory device. In addition to this it provides virtio > > device handling of flushing interface. KVM guest performs > > Qemu side asynchronous sync using this interface. > a random high level question, > Have you considered using a separate (from memory itself) > virtio device as controller for exposing some memory, async flushing. > And then just slaving pc-dimm devices to it with notification/ACPI > code suppressed so that guest won't touch them? No. > > That way it might be more scale-able, you consume only 1 PCI slot > for controller vs multiple for virtio-pmem devices. That sounds like a good suggestion. I will note it as an enhancement once we have other concerns related to basic working of 'flush' interface addressed. Then probably we can work on things 'need to optimize' with robust core flush functionality. BTW any sample code doing this right now in Qemu? > > > > Changes from previous RFC[1]: > > > > - Reuse existing 'pmem' code for registering persistent > > memory and other operations instead of creating an entirely > > new block driver. > > - Use VIRTIO driver to register memory information with > > nvdimm_bus and create region_type accordingly. > > - Call VIRTIO flush from existing pmem driver. > > > > Details of project idea for 'fake DAX' flushing interface is > > shared [2] & [3]. > > > > Pankaj Gupta (2): > > Add virtio-pmem guest driver > > pmem: device flush over VIRTIO > > > > [1] https://marc.info/?l=linux-mm&m=150782346802290&w=2 > > [2] https://www.spinics.net/lists/kvm/msg149761.html > > [3] https://www.spinics.net/lists/kvm/msg153095.html > > > > drivers/nvdimm/region_devs.c | 7 ++ > > drivers/virtio/Kconfig | 12 +++ > > drivers/virtio/Makefile | 1 > > drivers/virtio/virtio_pmem.c | 118 > > +++++++++++++++++++++++++++++++++++++++ > > include/linux/libnvdimm.h | 4 + > > include/uapi/linux/virtio_ids.h | 1 > > include/uapi/linux/virtio_pmem.h | 58 +++++++++++++++++++ > > 7 files changed, 201 insertions(+) > > > > >