From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756715AbcILGF4 (ORCPT ); Mon, 12 Sep 2016 02:05:56 -0400 Received: from mga01.intel.com ([192.55.52.88]:61720 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753374AbcILGFx (ORCPT ); Mon, 12 Sep 2016 02:05:53 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,321,1470726000"; d="scan'208";a="7220454" Subject: Re: DAX mapping detection (was: Re: [PATCH] Fix region lost in /proc/self/smaps) To: Dan Williams References: <20160908225636.GB15167@linux.intel.com> <5d5ef209-e005-12c6-9b34-1fdd21e1e6e2@linux.intel.com> Cc: Ross Zwisler , Dave Hansen , Paolo Bonzini , Andrew Morton , Michal Hocko , Gleb Natapov , mtosatti@redhat.com, KVM list , "linux-kernel@vger.kernel.org" , Stefan Hajnoczi , Yumei Huang , Linux MM , "linux-nvdimm@lists.01.org" , linux-fsdevel From: Xiao Guangrong Message-ID: Date: Mon, 12 Sep 2016 14:00:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/09/2016 11:40 PM, Dan Williams wrote: > On Fri, Sep 9, 2016 at 1:55 AM, Xiao Guangrong > wrote: > [..] >>> >>> Whether a persistent memory mapping requires an msync/fsync is a >>> filesystem specific question. This mincore proposal is separate from >>> that. Consider device-DAX for volatile memory or mincore() called on >>> an anonymous memory range. In those cases persistence and filesystem >>> metadata are not in the picture, but it would still be useful for >>> userspace to know "is there page cache backing this mapping?" or "what >>> is the TLB geometry of this mapping?". >> >> >> I got a question about msync/fsync which is beyond the topic of this thread >> :) >> >> Whether msync/fsync can make data persistent depends on ADR feature on >> memory >> controller, if it exists everything works well, otherwise, we need to have >> another >> interface that is why 'Flush hint table' in ACPI comes in. 'Flush hint >> table' is >> particularly useful for nvdimm virtualization if we use normal memory to >> emulate >> nvdimm with data persistent characteristic (the data will be flushed to a >> persistent storage, e.g, disk). >> >> Does current PMEM programming model fully supports 'Flush hint table'? Is >> userspace allowed to use these addresses? > > If you publish flush hint addresses in the virtual NFIT the guest VM > will write to them whenever a REQ_FLUSH or REQ_FUA request is sent to > the virtual /dev/pmemX device. Yes, seems straightforward to take a > VM exit on those events and flush simulated pmem to persistent > storage. > Thank you, Dan! However REQ_FLUSH or REQ_FUA is handled in kernel space, okay, after following up the discussion in this thread, i understood that currently filesystems have not supported the case that usespace itself make data be persistent without kernel's involvement. So that works. Hmm, Does device-DAX support this case (make data be persistent without msync/fsync)? I guess no, but just want to confirm it. :)