From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757983AbdJKSwD (ORCPT ); Wed, 11 Oct 2017 14:52:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51887 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752418AbdJKSwB (ORCPT ); Wed, 11 Oct 2017 14:52:01 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7C5D223D36 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pagupta@redhat.com From: Pankaj Gupta To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, qemu-devel@nongnu.org, linux-nvdimm@ml01.01.org, linux-mm@kvack.org Cc: jack@suse.cz, stefanha@redhat.com, dan.j.williams@intel.com, riel@redhat.com, haozhong.zhang@intel.com, nilal@redhat.com, kwolf@redhat.com, pbonzini@redhat.com, ross.zwisler@intel.com, david@redhat.com, xiaoguangrong.eric@gmail.com, pagupta@redhat.com Subject: [RFC] KVM "fake DAX" device flushing Date: Thu, 12 Oct 2017 00:21:46 +0530 Message-Id: <20171011185146.20295-1-pagupta@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 11 Oct 2017 18:52:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We are sharing the prototype version of 'fake DAX' flushing interface for the initial feedback. This is still work in progress and not yet ready for merging. Protoype right now just implements basic functionality without advanced features with two major parts: - 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 a virtio flushing interface for KVM guest to do a Qemu side sync for guest DAX persistent memory range. - Guest virtio-pmem driver Reads persistent memory range from paravirt device and reserves system memory map. It also allocates a block device corresponding to the pmem range which is accessed by DAX capable file systems. (file system support is still pending). We shared the project idea for 'fake DAX' flushing interface here [1]. Based on suggestions here [2], we implemented guest 'virtio-pmem' driver and Qemu paravirt device. [1] https://www.spinics.net/lists/kvm/msg149761.html [2] https://www.spinics.net/lists/kvm/msg153095.html Work yet to be done: - Separate out the common code used by ACPI pmem interface and reuse it. - In pmem device memmap allocation and working. There is some parallel work going on upstream related to 'memory_hotplug restructuring' [3] and also hitting a memory section alignment issue [4]. [3] https://lwn.net/Articles/712099/ [4] https://www.mail-archive.com/linux-nvdimm@lists.01.org/msg02978.html - Provide DAX capable file-system(ext4 & XFS) support. - Qemu device flush functionality. - Qemu live migration work when host page cache is used. - Multiple virtio-pmem disks support. Prototype implementation for feedback: Kernel: https://github.com/pagupta/linux/commit/d15cf90074eae91aeed7a228da3faf319566dd40 Qemu : https://github.com/pagupta/qemu/commit/9c428db1e1076970e097e2b0ef8afe52509af823 Please provide feedback. Also, I would be attending KVM Forum in Prague from (25-27 Oct). If you are attending KVM forum/Linux conference, I would love to have a discussion on ideas and future work. Thank you, Pankaj Gupta