From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932568AbcILDpG (ORCPT ); Sun, 11 Sep 2016 23:45:06 -0400 Received: from mga01.intel.com ([192.55.52.88]:34297 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756080AbcILDpB (ORCPT ); Sun, 11 Sep 2016 23:45:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,320,1470726000"; d="scan'208";a="7391454" From: "Rudoff, Andy" To: Xiao Guangrong , "Williams, Dan J" , Ross Zwisler , "Hansen, Dave" , 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 Subject: Re: DAX mapping detection (was: Re: [PATCH] Fix region lost in /proc/self/smaps) Thread-Topic: DAX mapping detection (was: Re: [PATCH] Fix region lost in /proc/self/smaps) Thread-Index: AQHSCYoIdQsDHBQqJ0aYYZJqnUDU5aBwqsUAgAACEQCAAKUpAIAD+9qA Date: Mon, 12 Sep 2016 03:44:59 +0000 Message-ID: References: <20160908225636.GB15167@linux.intel.com> <5d5ef209-e005-12c6-9b34-1fdd21e1e6e2@linux.intel.com> In-Reply-To: <5d5ef209-e005-12c6-9b34-1fdd21e1e6e2@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/f.19.0.160817 x-originating-ip: [10.254.18.210] Content-Type: text/plain; charset="utf-8" Content-ID: <76885E75BDC24242BEF18F4F486DC627@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u8C3jELo009976 >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? The Flush hint table is NOT a replacement for ADR. To support pmem on the x86 architecture, the platform is required to ensure that a pmem store flushed from the CPU caches is in the persistent domain so that the application need not take any additional steps to make it persistent. The most common way to do this is the ADR feature. If the above is not true, then your x86 platform does not support pmem. Flush hints are for use by the BIOS and drivers and are not intended to be used in user space. Flush hints provide two things: First, if a driver needs to write to command registers or movable windows on a DIMM, the Flush hint (if provided in the NFIT) is required to flush the command to the DIMM or ensure stores done through the movable window are complete before moving it somewhere else. Second, for the rare case where the kernel wants to flush stores to the smallest possible failure domain (i.e. to the DIMM even though ADR will handle flushing it from a larger domain), the flush hints provide a way to do this. This might be useful for things like file system journals to help ensure the file system is consistent even in the face of ADR failure. -andy