From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <552CB695.2020805@plexistor.com> Date: Tue, 14 Apr 2015 09:41:25 +0300 From: Boaz Harrosh MIME-Version: 1.0 Subject: Re: [Linux-nvdimm] [GIT PULL] PMEM driver for v4.1 References: <20150413093309.GA30219@gmail.com> <20150413093541.GA5147@lst.de> <20150413104531.GB30556@gmail.com> <20150413171907.GB14243@lst.de> In-Reply-To: <20150413171907.GB14243@lst.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org To: Christoph Hellwig , Yigal Korman Cc: linux-nvdimm@lists.01.org, "linux-kernel@vger.kernel.org" , Matthew Wilcox , Linus Torvalds , Ingo Molnar List-ID: On 04/13/2015 08:19 PM, Christoph Hellwig wrote: > On Mon, Apr 13, 2015 at 02:11:56PM +0300, Yigal Korman wrote: >> mlock() > > DAX files always are in-memory so this just sounds like an oversight. > method. Yes mlock on DAX can just return true, but mlock implies MAP_POPULATE. Which means "I would like to page-fault the all mmap range at mmap time so at access time I'm guarantied not to sleep". This is usually done for latency sensitive applications. But current code fails on MAP_POPULATE for DAX because it is only implemented for pages, and therefor mlock fails as well. One thing I do not understand. does mlock also protects against truncate? Thanks Boaz