From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:49578 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbdJ0Gp3 (ORCPT ); Fri, 27 Oct 2017 02:45:29 -0400 Date: Fri, 27 Oct 2017 08:45:27 +0200 From: Christoph Hellwig Subject: Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support Message-ID: <20171027064526.GD22931@lst.de> References: <150846713528.24336.4459262264611579791.stgit@dwillia2-desk3.amr.corp.intel.com> <20171020074750.GA13568@lst.de> <20171020093148.GA20304@lst.de> <20171026105850.GA31161@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171026105850.GA31161@quack2.suse.cz> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Jan Kara Cc: Christoph Hellwig , Dan Williams , akpm@linux-foundation.org, Michal Hocko , Benjamin Herrenschmidt , Dave Hansen , Dave Chinner , "J. Bruce Fields" , linux-mm@kvack.org, Paul Mackerras , Sean Hefty , Jeff Layton , Matthew Wilcox , linux-rdma@vger.kernel.org, Michael Ellerman , Jeff Moyer , Jason Gunthorpe , Doug Ledford , Ross Zwisler , Hal Rosenstock , Heiko Carstens , linux-nvdimm@lists.01.org, Alexander Viro , Gerald Schaefer , "Darrick J. Wong" , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, Martin Schwidefsky , linux-fsdevel@vger.kernel.org, "Kirill A. Shutemov" On Thu, Oct 26, 2017 at 12:58:50PM +0200, Jan Kara wrote: > But are we guaranteed page refs are short term? E.g. if someone creates > v4l2 videobuf in MAP_SHARED mapping of a file on DAX filesystem, page refs > can be rather long-term similarly as in RDMA case. Also freeing of blocks > on page reference drop is another async entry point into the filesystem > which could unpleasantly surprise us but I guess workqueues would solve > that reasonably fine. The point is that we need to prohibit long term elevated page counts with DAX anyway - we can't just let people grab allocated blocks forever while ignoring file system operations. For stage 1 we'll just need to fail those, and in the long run they will have to use a mechanism similar to FL_LAYOUT locks to deal with file system allocation changes.