From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26989C433DF for ; Mon, 10 Aug 2020 11:17:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BEF9D206E9 for ; Mon, 10 Aug 2020 11:17:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="OCNWmeSi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEF9D206E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0DDC96B0003; Mon, 10 Aug 2020 07:17:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 08E8D6B0005; Mon, 10 Aug 2020 07:17:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE8196B0006; Mon, 10 Aug 2020 07:17:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0052.hostedemail.com [216.40.44.52]) by kanga.kvack.org (Postfix) with ESMTP id D4C616B0003 for ; Mon, 10 Aug 2020 07:17:10 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 65FCF181AC9CC for ; Mon, 10 Aug 2020 11:17:10 +0000 (UTC) X-FDA: 77134407420.28.brain01_2b103db26fd9 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 3988B6C3C for ; Mon, 10 Aug 2020 11:17:10 +0000 (UTC) X-HE-Tag: brain01_2b103db26fd9 X-Filterd-Recvd-Size: 3435 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Mon, 10 Aug 2020 11:17:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=LF7J00zPGvE5+TvNb+kSZ/mLnQ6lmd1ykbbcKN0G5P0=; b=OCNWmeSiZDDpjF5Hgiofx6N6ON mkqo524ZrkTmjYeAH/LOzFSErW1eK+WyzkAZsFnVA34VOuSVBXoSGM7MZ+/9KklSyZN05mfuOyT0s 2YhgWUkFXY+JSuAnnaw4NmrKz7wA57V3jBIlZHPNkZdhVqDXFnmhvk2JKjby9cP7BlVaWDfAzs53N lkQLlrm4o/LDXG8+jPi57WYiSsbgy1qMRGEEL8mYfBJh/Cz0n3tZebBXT9ZPwoMDjAhbgQ2MQPDaJ U4AvMZQcyGTR2UWCtkSXx4VKMEPJLjTvF5HALWCUljf51bkVR9AU8RSTIPChGPGHGBS0dNqkiVmpQ /ZGi0Vig==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k55nV-0002Ra-ET; Mon, 10 Aug 2020 11:16:57 +0000 Date: Mon, 10 Aug 2020 12:16:57 +0100 From: Matthew Wilcox To: Ruan Shiyang Cc: linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nvdimm@lists.01.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, darrick.wong@oracle.com, dan.j.williams@intel.com, david@fromorbit.com, hch@lst.de, rgoldwyn@suse.de, qi.fuli@fujitsu.com, y-goto@fujitsu.com Subject: Re: [RFC PATCH 0/8] fsdax: introduce FS query interface to support reflink Message-ID: <20200810111657.GL17456@casper.infradead.org> References: <20200807131336.318774-1-ruansy.fnst@cn.fujitsu.com> <20200807133857.GC17456@casper.infradead.org> <9673ed3c-9e42-3d01-000b-b01cda9832ce@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9673ed3c-9e42-3d01-000b-b01cda9832ce@cn.fujitsu.com> X-Rspamd-Queue-Id: 3988B6C3C X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000018, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Aug 10, 2020 at 04:15:50PM +0800, Ruan Shiyang wrote: >=20 >=20 > On 2020/8/7 =E4=B8=8B=E5=8D=889:38, Matthew Wilcox wrote: > > On Fri, Aug 07, 2020 at 09:13:28PM +0800, Shiyang Ruan wrote: > > > This patchset is a try to resolve the problem of tracking shared pa= ge > > > for fsdax. > > >=20 > > > Instead of per-page tracking method, this patchset introduces a que= ry > > > interface: get_shared_files(), which is implemented by each FS, to > > > obtain the owners of a shared page. It returns an owner list of th= is > > > shared page. Then, the memory-failure() iterates the list to be ab= le > > > to notify each process using files that sharing this page. > > >=20 > > > The design of the tracking method is as follow: > > > 1. dax_assocaite_entry() associates the owner's info to this page > >=20 > > I think that's the first problem with this design. dax_associate_ent= ry is > > a horrendous idea which needs to be ripped out, not made more importa= nt. > > It's all part of the general problem of trying to do something on a > > per-page basis instead of per-extent basis. > >=20 >=20 > The memory-failure needs to track owners info from a dax page, so I sho= uld > associate the owner with this page. In this version, I associate the b= lock > device to the dax page, so that the memory-failure is able to iterate t= he > owners by the query interface provided by filesystem. No, it doesn't need to track owner info from a DAX page. What it needs t= o do is ask the filesystem.