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=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 D61A3C433E0 for ; Mon, 10 Aug 2020 08:16:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A3EE6206B5 for ; Mon, 10 Aug 2020 08:16:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3EE6206B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=cn.fujitsu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3BBE76B0007; Mon, 10 Aug 2020 04:16:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 344D16B0008; Mon, 10 Aug 2020 04:16:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 234516B000A; Mon, 10 Aug 2020 04:16:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id 0B3016B0007 for ; Mon, 10 Aug 2020 04:16:12 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B6FB4365D for ; Mon, 10 Aug 2020 08:16:11 +0000 (UTC) X-FDA: 77133951342.26.loss66_461713126fd8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 82A891804B654 for ; Mon, 10 Aug 2020 08:16:11 +0000 (UTC) X-HE-Tag: loss66_461713126fd8 X-Filterd-Recvd-Size: 3384 Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Mon, 10 Aug 2020 08:16:07 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.75,456,1589212800"; d="scan'208";a="97927751" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 10 Aug 2020 16:16:05 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id 1A5144CE34E6; Mon, 10 Aug 2020 16:16:00 +0800 (CST) Received: from irides.mr (10.167.225.141) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 Aug 2020 16:16:02 +0800 Subject: Re: [RFC PATCH 0/8] fsdax: introduce FS query interface to support reflink To: Matthew Wilcox CC: , , , , , , , , , , , References: <20200807131336.318774-1-ruansy.fnst@cn.fujitsu.com> <20200807133857.GC17456@casper.infradead.org> From: Ruan Shiyang Message-ID: <9673ed3c-9e42-3d01-000b-b01cda9832ce@cn.fujitsu.com> Date: Mon, 10 Aug 2020 16:15:50 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200807133857.GC17456@casper.infradead.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US X-Originating-IP: [10.167.225.141] X-ClientProxiedBy: G08CNEXCHPEKD06.g08.fujitsu.local (10.167.33.205) To G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) X-yoursite-MailScanner-ID: 1A5144CE34E6.AAE60 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@cn.fujitsu.com X-Rspamd-Queue-Id: 82A891804B654 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000736, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 page >> for fsdax. >> >> Instead of per-page tracking method, this patchset introduces a query >> interface: get_shared_files(), which is implemented by each FS, to >> obtain the owners of a shared page. It returns an owner list of this >> shared page. Then, the memory-failure() iterates the list to be able >> to notify each process using files that sharing this page. >> >> 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_entry= is > a horrendous idea which needs to be ripped out, not made more important= . > It's all part of the general problem of trying to do something on a > per-page basis instead of per-extent basis. >=20 The memory-failure needs to track owners info from a dax page, so I=20 should associate the owner with this page. In this version, I associate=20 the block device to the dax page, so that the memory-failure is able to=20 iterate the owners by the query interface provided by filesystem. -- Thanks, Ruan Shiyang. >=20 >=20