From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem Date: Tue, 20 Jun 2017 10:49:24 +0200 Message-ID: <20170620084924.GA9752@lst.de> References: <149766213493.22552.4057048843646200083.stgit@dwillia2-desk3.amr.corp.intel.com> <20170619132107.GG11993@dastard> <20170620004653.GI17542@dastard> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: Andy Lutomirski Cc: Dave Chinner , Dan Williams , Ross Zwisler , andy.rudoff@intel.com, Andrew Morton , Jan Kara , linux-nvdimm , Linux API , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Jeff Moyer , Linux FS Devel , Christoph Hellwig List-Id: linux-api@vger.kernel.org [stripped giant fullquotes] On Mon, Jun 19, 2017 at 10:53:12PM -0700, Andy Lutomirski wrote: > But that's my whole point. The kernel doesn't really need to prevent > all these background maintenance operations -- it just needs to block > .page_mkwrite until they are synced. I think that whatever new > mechanism we add for this should be sticky, but I see no reason why > the filesystem should have to block reflink on a DAX file entirely. Agreed - IFF we want to support write through semantics this is the only somewhat feasible way. It still has massive downsides of forcing the full sync machinery to run from the page fauly handler, which I'm rather scared off, but that's still better than creating a magic special case that isn't managable at all. > If, instead, we had a nice unprivileged per-vma or per-fd mechanism to > tell the filesystem that I want DAX durability, I could just use it > without any fuss. If it worked on ext4 before it worked on xfs, then > I'd use ext4. If it ended up being heavier weight on XFS than it was > on ext4 because XFS needed to lock down the extent map for the inode > whereas ext4 could manage it through .page_mkwrite(), then I'd > benchmark it and see which fs would win. (For my particular use case, > I doubt it would matter, since I aggressively offload fs metadata > operations to a thread whose performance I don't really care about.) ext4 and XFS have the same fundamental issue: both have a file system wide log of modified data that needs to be flushed to stable storage to ensure everything is safe. So if you solve the issue for one of them you've solved it for the other one as well modulo implementation details. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E6BCA21AE2639 for ; Tue, 20 Jun 2017 01:48:03 -0700 (PDT) Date: Tue, 20 Jun 2017 10:49:24 +0200 From: Christoph Hellwig Subject: Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem Message-ID: <20170620084924.GA9752@lst.de> References: <149766213493.22552.4057048843646200083.stgit@dwillia2-desk3.amr.corp.intel.com> <20170619132107.GG11993@dastard> <20170620004653.GI17542@dastard> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Andy Lutomirski Cc: Jan Kara , linux-nvdimm , Linux API , Dave Chinner , "linux-kernel@vger.kernel.org" , Christoph Hellwig , "linux-mm@kvack.org" , Linux FS Devel , Andrew Morton List-ID: [stripped giant fullquotes] On Mon, Jun 19, 2017 at 10:53:12PM -0700, Andy Lutomirski wrote: > But that's my whole point. The kernel doesn't really need to prevent > all these background maintenance operations -- it just needs to block > .page_mkwrite until they are synced. I think that whatever new > mechanism we add for this should be sticky, but I see no reason why > the filesystem should have to block reflink on a DAX file entirely. Agreed - IFF we want to support write through semantics this is the only somewhat feasible way. It still has massive downsides of forcing the full sync machinery to run from the page fauly handler, which I'm rather scared off, but that's still better than creating a magic special case that isn't managable at all. > If, instead, we had a nice unprivileged per-vma or per-fd mechanism to > tell the filesystem that I want DAX durability, I could just use it > without any fuss. If it worked on ext4 before it worked on xfs, then > I'd use ext4. If it ended up being heavier weight on XFS than it was > on ext4 because XFS needed to lock down the extent map for the inode > whereas ext4 could manage it through .page_mkwrite(), then I'd > benchmark it and see which fs would win. (For my particular use case, > I doubt it would matter, since I aggressively offload fs metadata > operations to a thread whose performance I don't really care about.) ext4 and XFS have the same fundamental issue: both have a file system wide log of modified data that needs to be flushed to stable storage to ensure everything is safe. So if you solve the issue for one of them you've solved it for the other one as well modulo implementation details. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752252AbdFTIuh (ORCPT ); Tue, 20 Jun 2017 04:50:37 -0400 Received: from verein.lst.de ([213.95.11.211]:33748 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751789AbdFTIt0 (ORCPT ); Tue, 20 Jun 2017 04:49:26 -0400 Date: Tue, 20 Jun 2017 10:49:24 +0200 From: Christoph Hellwig To: Andy Lutomirski Cc: Dave Chinner , Dan Williams , Ross Zwisler , andy.rudoff@intel.com, Andrew Morton , Jan Kara , linux-nvdimm , Linux API , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Jeff Moyer , Linux FS Devel , Christoph Hellwig Subject: Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem Message-ID: <20170620084924.GA9752@lst.de> References: <149766213493.22552.4057048843646200083.stgit@dwillia2-desk3.amr.corp.intel.com> <20170619132107.GG11993@dastard> <20170620004653.GI17542@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [stripped giant fullquotes] On Mon, Jun 19, 2017 at 10:53:12PM -0700, Andy Lutomirski wrote: > But that's my whole point. The kernel doesn't really need to prevent > all these background maintenance operations -- it just needs to block > .page_mkwrite until they are synced. I think that whatever new > mechanism we add for this should be sticky, but I see no reason why > the filesystem should have to block reflink on a DAX file entirely. Agreed - IFF we want to support write through semantics this is the only somewhat feasible way. It still has massive downsides of forcing the full sync machinery to run from the page fauly handler, which I'm rather scared off, but that's still better than creating a magic special case that isn't managable at all. > If, instead, we had a nice unprivileged per-vma or per-fd mechanism to > tell the filesystem that I want DAX durability, I could just use it > without any fuss. If it worked on ext4 before it worked on xfs, then > I'd use ext4. If it ended up being heavier weight on XFS than it was > on ext4 because XFS needed to lock down the extent map for the inode > whereas ext4 could manage it through .page_mkwrite(), then I'd > benchmark it and see which fs would win. (For my particular use case, > I doubt it would matter, since I aggressively offload fs metadata > operations to a thread whose performance I don't really care about.) ext4 and XFS have the same fundamental issue: both have a file system wide log of modified data that needs to be flushed to stable storage to ensure everything is safe. So if you solve the issue for one of them you've solved it for the other one as well modulo implementation details.