Received: by 10.192.165.148 with SMTP id m20csp2398934imm; Thu, 26 Apr 2018 10:17:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqTFGPDGxeMSndEIOZ51KGN9hXTRbEJhUu871nlpgwdtG4NBL0HnoSHc3WifQQ/9bJBgQNQ X-Received: by 2002:a17:902:8ec4:: with SMTP id x4-v6mr1160161plo.370.1524763049135; Thu, 26 Apr 2018 10:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524763049; cv=none; d=google.com; s=arc-20160816; b=SGDHAjF9tXEVW6qYX3JSb1GTFC67onOj0FrUNzXlz4Sqa2zSx4jVyZsU0N5DOJWlE2 FVehs/H7uQxtB0s9JTRxS/T72KRlHsYhUIPgxxpB+LS4BdpmzyPHcc4iHTi7R+uVVMFr +ChVwK4Mi36xWpz4aU7pNBah4AVG14urTnkUjtk0qREI3xGt44qhDQ9GY9r49szfAaVu rwuchBiNQDWh3pF23EqQzAR7oDz5ctBrec8cO/mIjTSyv9n1ejmsUNhxC7+4AV+9m+Rq 2ah9mugwUAynBp5Pddkk6OXBdp8eEsnbJCJM2bSFVo5DTZQd9CzTK+cUoN6RbnJO+Dg4 39cg== 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=UX05H9Q2duXITWR7QSkG3LN/sqlztJeF0FtT7N4OZgY=; b=s7cw/SuRxy/dBcu+/E8KBpCx290NfSoIzJOqZDXWkYSt8uO1H1+sO4C/40EFyxeRXn Cr+8MEI6Me2htA5/zw2slUUMCVN3a3+4G43TZm63XwSwt4PcTRxakz3QSTbgy28gHjc6 yIbyb8+yUkGSlQhb0fWAEeaijuaReaGkSw9xdRIKR6e1qKVBgwW7DK6LKdpIdSZbUKsg bvwLuSLFjUCaHpVjHZ7plSdJBficx4E98XQxTyAtlV/F2LHU6RXyM1vcHfAdIG5oSqFp 9+1Mi0p84pg0i0gJR3qPE99VsebjLyXrIiGHb+dnPjN1slWk1KdM1sLwMibd2J7Q04Zy bNTw== 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 n23si16526040pgc.359.2018.04.26.10.17.13; Thu, 26 Apr 2018 10:17:29 -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 S1756823AbeDZRPl (ORCPT + 99 others); Thu, 26 Apr 2018 13:15:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1690 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754419AbeDZRPj (ORCPT ); Thu, 26 Apr 2018 13:15:39 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 20D3B3002F8A; Thu, 26 Apr 2018 17:15:39 +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 01164314EE60; Thu, 26 Apr 2018 17:15:39 +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 C4C844CA9E; Thu, 26 Apr 2018 17:15:38 +0000 (UTC) Date: Thu, 26 Apr 2018 13:15:38 -0400 (EDT) From: Pankaj Gupta To: Jeff Moyer , Dan Williams Cc: Jan Kara , KVM list , David Hildenbrand , linux-nvdimm , Ross Zwisler , Qemu Developers , lcapitulino@redhat.com, Linux MM , niteshnarayanlal@hotmail.com, "Michael S. Tsirkin" , Christoph Hellwig , Marcel Apfelbaum , Nitesh Narayan Lal , Haozhong Zhang , Rik van Riel , Stefan Hajnoczi , Paolo Bonzini , Kevin Wolf , Xiao Guangrong , Linux Kernel Mailing List , Igor Mammedov Message-ID: <1499190564.23017177.1524762938762.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20180425112415.12327-1-pagupta@redhat.com> <20180425112415.12327-2-pagupta@redhat.com> Subject: Re: [Qemu-devel] [RFC v2 1/2] virtio: add pmem driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.119, 10.4.195.13] Thread-Topic: virtio: add pmem driver Thread-Index: /imvhUOXH3u4LmxyH8rb+mLcULCcBw== X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 26 Apr 2018 17:15:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Dan Williams writes: > > > [ adding Jeff directly since he has also been looking at > > infrastructure to track when MAP_SYNC should be disabled ] > > > > On Wed, Apr 25, 2018 at 7:21 AM, Dan Williams > > wrote: > >> On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta wrote: > >>> This patch adds virtio-pmem driver for KVM > >>> guest. > >> > >> Minor nit, please expand your changelog line wrapping to 72 columns. > >> > >>> > >>> 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. > >> > >> We need some additional enabling to disable MAP_SYNC for this > > enable to disable... I like it! ;-) > > >> configuration. In other words, if fsync() is required then we must > >> disable the MAP_SYNC optimization. I think this should be a struct > >> dax_device property looked up at mmap time in each MAP_SYNC capable > >> ->mmap() file operation implementation. I understand you mean we want to disable 'MAP_SYNC' optimization as we are relying on additional fsync. You mean if we add a property/flag in dax_device struct and its set, disable 'MAP_SYNC' accordingly during mmap time for corresponding filesystems? > > Ideally, qemu (seabios?) would advertise a platform capabilities > sub-table that doesn't fill in the flush bits. Could you please elaborate on this, how its related to disabling MAP_SYNC? We are not doing entire nvdimm device emulation. > > -Jeff > >