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 69F98C433E0 for ; Mon, 10 Aug 2020 08:16:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FDAB206B5 for ; Mon, 10 Aug 2020 08:16:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726542AbgHJIQH (ORCPT ); Mon, 10 Aug 2020 04:16:07 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:54452 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726021AbgHJIQH (ORCPT ); Mon, 10 Aug 2020 04:16:07 -0400 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 Content-Transfer-Encoding: 8bit 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/8/7 下午9: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 > > 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. > The memory-failure needs to track owners info from a dax page, so I should associate the owner with this page. In this version, I associate the block device to the dax page, so that the memory-failure is able to iterate the owners by the query interface provided by filesystem. -- Thanks, Ruan Shiyang. > >