Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3396582imm; Mon, 4 Jun 2018 02:56:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLalaQH4ot4OH64Z9O9eJBXYdExiJfYJJD7l9Dko0gBczMT6tDLeAcx7APnmiuxOlnKrH91 X-Received: by 2002:a62:1bc2:: with SMTP id b185-v6mr17219432pfb.225.1528106194131; Mon, 04 Jun 2018 02:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528106194; cv=none; d=google.com; s=arc-20160816; b=fQlwG7ZGRMzqd3s+5njUlYtMbj4eTKMqj/FBJpu/AmGwiY6OPvL6YrGKiaq7GVJFXF KKgzz+pE/+zlLkpFWIFjX699yxSJULTph24dPl6Ci24lbY9UJyt2CI3y+biRCdShTsNO 4KOG4BkYQOYlaOU//XExMA6hS0LmiEoG7fSfIn+E+sKrFB27OceGXgSwLM9UH9s2ADa/ NytDTlQiwCYEpMtGJm71mkWNCsdaC0qTKI0yePDwOg7ce1SEjULYJ3CLj/IG0UXNSVrh ZM9wNM9LOjARraA/iOGX6XC3ghg4WBVTDmDQc66GxybpE92/83nDPR2OaT8uUFrTID0g /wkQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=d9wBQkdJtW/xYRBo+NV5YmOfDD7vsYA74xqXdqbmFtc=; b=rb0kKut+OzQvqPs8c1W4B0e5lBtmDy1ziKQvnEv3ejEVtJSq7jpoxX/4tNIn7lLVgX tuaBHcH2nOS1y3/iOHeQLPkXLnBprF8JxqEI4fhmf4VixoxyPDqsmmGW7H/yUOebF311 EB3ih0Xm7eGKApT8YbymTNlLuqOiOxTCaU14UDknZmdXaGzg68P7JXypOo6YgYcqN//U QRvO5ARS5497sZpqK1kuabZ9BqdTjk6yiy/v39OzHnqnAE/OaEQGVyDsOru/dGCM1o9g m3nSVkQveYy4aUMePesaAlgi+g18eMe0zZVeFBj3tpX6lcNIusKxYQywCl0xR+J8l+gJ 2JrQ== 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 y90-v6si19849759pfd.47.2018.06.04.02.56.20; Mon, 04 Jun 2018 02:56:34 -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 S1752137AbeFDJzm (ORCPT + 99 others); Mon, 4 Jun 2018 05:55:42 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:41370 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751769AbeFDJzk (ORCPT ); Mon, 4 Jun 2018 05:55:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2841881663F9; Mon, 4 Jun 2018 09:55:40 +0000 (UTC) Received: from [10.36.117.78] (ovpn-117-78.ams2.redhat.com [10.36.117.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 91E19217B400; Mon, 4 Jun 2018 09:55:34 +0000 (UTC) Subject: Re: [Qemu-devel] [RFC v2 0/2] kvm "fake DAX" device flushing To: Igor Mammedov , Pankaj Gupta Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, qemu-devel@nongnu.org, linux-nvdimm@ml01.01.org, linux-mm@kvack.org, kwolf@redhat.com, haozhong.zhang@intel.com, jack@suse.cz, xiaoguangrong.eric@gmail.com, riel@surriel.com, niteshnarayanlal@hotmail.com, ross.zwisler@intel.com, lcapitulino@redhat.com, hch@infradead.org, mst@redhat.com, stefanha@redhat.com, marcel@redhat.com, pbonzini@redhat.com, dan.j.williams@intel.com, nilal@redhat.com References: <20180425112415.12327-1-pagupta@redhat.com> <20180601142410.5c986f13@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Mon, 4 Jun 2018 11:55:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180601142410.5c986f13@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 04 Jun 2018 09:55:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 04 Jun 2018 09:55:40 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'david@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.06.2018 14:24, Igor Mammedov wrote: > On Wed, 25 Apr 2018 16:54:12 +0530 > Pankaj Gupta wrote: > > [...] >> - 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? I don't think slaving pc-dimm would be the right thing to do (e.g. slots, pcdimm vs nvdimm, bus(less), etc..). However the general idea is interesting for virtio-pmem (as we might have a bigger number of disks). We could have something like a virtio-pmem-bus to which you attach virtio-pmem devices. By specifying the mapping, e.g. the thread that will be used for async flushes will be implicit. > > That way it might be more scale-able, you consume only 1 PCI slot > for controller vs multiple for virtio-pmem devices.> > >> 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(+) >> > -- Thanks, David / dhildenb