Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1517595pxb; Fri, 26 Feb 2021 12:54:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4RqN94wHBUl6vBZe0v5JVcSY0CcDN8QtYmv63PJ0PnWzzbQvc1+6VGYk85vxlNZFG3bU8 X-Received: by 2002:a17:906:6088:: with SMTP id t8mr5421151ejj.323.1614372897411; Fri, 26 Feb 2021 12:54:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614372897; cv=none; d=google.com; s=arc-20160816; b=QbAwABRS1xkwONk2ZnGx1Ucyb/ETiFlrWbi+K4oGf5QcD1xI4uy4KzH3I1ioAmWGNp jVh/tCaZ0pMNZvFns5C3sUcdYrNbH7pJpXbbSYEqtYHBIiWiRBUZPx2quo0C7qke1PhO GtRVlDWzo5WpJvUsTUfjLis9qsEeRkcRRX3AtWnhx93mqLdeK3KkzH0p0YLcE8bXix6A u8hLtvj496PPEoElnekKJjwJiCtIlH6M9MBnVb6QseFJjlpkU18HMcJe8OcH6EBsvm1L /qZoD0c9al+NSKBPkxHsp9G4gEd4zGcJwGDd6n/ruqbvlmVwZx6QcBMZeLWrc2W0h0+W Yf5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3WJTJjGDwn05h7Y23qteyeel4u/MBkwwmcGPIeKfFPk=; b=JxZ71h9wr848qXJujSrZFnhMeZl/95XIlexFbt4OAtDxvrfr+TMlV46YwZ05XNrnTU EuD5S6GSxA5MmUBBVTRQek//P/Q1SDobKSyMBfrZJpyRIOJ9EytMJMNJZCKyl+cslU6b KlBmTSMpACPzES/hApJxA/2oRgfuaOd96O843dyj4PPJdlPvXQ/ZFBRyImJtmSfKJ0F2 Y0shZrNwhZR5k5gnUXuOv9LZASoewo+EccsC6hfwVzo47dIJ/wzaGy/FRlzWJr7E4MsG ysckAUFWWfxAKBox26i3w0TdBuEC9nUILhB8kCDUbPasNW3UvXgRL5udmeKnvUpWQCMU X1xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp13si5968376ejc.24.2021.02.26.12.54.35; Fri, 26 Feb 2021 12:54:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbhBZUwT (ORCPT + 99 others); Fri, 26 Feb 2021 15:52:19 -0500 Received: from mail107.syd.optusnet.com.au ([211.29.132.53]:45206 "EHLO mail107.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229863AbhBZUwQ (ORCPT ); Fri, 26 Feb 2021 15:52:16 -0500 Received: from dread.disaster.area (pa49-179-130-210.pa.nsw.optusnet.com.au [49.179.130.210]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id AB0FEFA75A7; Sat, 27 Feb 2021 07:51:28 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1lFk58-005n9L-Ty; Sat, 27 Feb 2021 07:51:26 +1100 Date: Sat, 27 Feb 2021 07:51:26 +1100 From: Dave Chinner To: Dan Williams Cc: "Darrick J. Wong" , "ruansy.fnst@fujitsu.com" , "linux-kernel@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "linux-fsdevel@vger.kernel.org" , "darrick.wong@oracle.com" , "willy@infradead.org" , "jack@suse.cz" , "viro@zeniv.linux.org.uk" , "linux-btrfs@vger.kernel.org" , "ocfs2-devel@oss.oracle.com" , "hch@lst.de" , "rgoldwyn@suse.de" , "y-goto@fujitsu.com" , "qi.fuli@fujitsu.com" , "fnstml-iaas@cn.fujitsu.com" Subject: Re: Question about the "EXPERIMENTAL" tag for dax in XFS Message-ID: <20210226205126.GX4662@dread.disaster.area> References: <20210226002030.653855-1-ruansy.fnst@fujitsu.com> <20210226190454.GD7272@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=YKPhNiOx c=1 sm=1 tr=0 cx=a_idp_d a=JD06eNgDs9tuHP7JIKoLzw==:117 a=JD06eNgDs9tuHP7JIKoLzw==:17 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=VwQbUJbxAAAA:8 a=omOdbC7AAAAA:8 a=pGLkceISAAAA:8 a=7-415B0cAAAA:8 a=kMQJH97U55PVhH6LZb8A:9 a=CjuIK1q_8ugA:10 a=AjGcO6oz07-iQ99wixmX:22 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 11:24:53AM -0800, Dan Williams wrote: > On Fri, Feb 26, 2021 at 11:05 AM Darrick J. Wong wrote: > > > > On Fri, Feb 26, 2021 at 09:45:45AM +0000, ruansy.fnst@fujitsu.com wrote: > > > Hi, guys > > > > > > Beside this patchset, I'd like to confirm something about the > > > "EXPERIMENTAL" tag for dax in XFS. > > > > > > In XFS, the "EXPERIMENTAL" tag, which is reported in waring message > > > when we mount a pmem device with dax option, has been existed for a > > > while. It's a bit annoying when using fsdax feature. So, my initial > > > intention was to remove this tag. And I started to find out and solve > > > the problems which prevent it from being removed. > > > > > > As is talked before, there are 3 main problems. The first one is "dax > > > semantics", which has been resolved. The rest two are "RMAP for > > > fsdax" and "support dax reflink for filesystem", which I have been > > > working on. > > > > > > > > > So, what I want to confirm is: does it means that we can remove the > > > "EXPERIMENTAL" tag when the rest two problem are solved? > > > > Yes. I'd keep the experimental tag for a cycle or two to make sure that > > nothing new pops up, but otherwise the two patchsets you've sent close > > those two big remaining gaps. Thank you for working on this! > > > > > Or maybe there are other important problems need to be fixed before > > > removing it? If there are, could you please show me that? > > > > That remains to be seen through QA/validation, but I think that's it. > > > > Granted, I still have to read through the two patchsets... > > I've been meaning to circle back here as well. > > My immediate concern is the issue Jason recently highlighted [1] with > respect to invalidating all dax mappings when / if the device is > ripped out from underneath the fs. I don't think that will collide > with Ruan's implementation, but it does need new communication from > driver to fs about removal events. > > [1]: http://lore.kernel.org/r/CAPcyv4i+PZhYZiePf2PaH0dT5jDfkmkDX-3usQy1fAhf6LPyfw@mail.gmail.com Oh, yay. The XFS shutdown code is centred around preventing new IO from being issued - we don't actually do anything about DAX mappings because, well, I don't think anyone on the filesystem side thought they had to do anything special if pmem went away from under it. My understanding -was- that the pmem removal invalidates all the ptes currently mapped into CPU page tables that point at the dax device across the system. THe vmas that manage these mappings are not really something the filesystem really manages, but a function of the mm subsystem. What the filesystem cares about is that it gets page faults triggered when a change of state occurs so that it can remap the page to it's backing store correctly. IOWs, all the mm subsystem needs to when pmem goes away is clear the CPU ptes, because then when then when userspace tries to access the mapped DAX pages we get a new page fault. In processing the fault, the filesystem will try to get direct access to the pmem from the block device. This will get an ENODEV error from the block device because because the backing store (pmem) has been unplugged and is no longer there... AFAICT, as long as pmem removal invalidates all the active ptes that point at the pmem being removed, the filesystem doesn't need to care about device removal at all, DAX or no DAX... Cheers, Dave. -- Dave Chinner david@fromorbit.com