Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2237948pxa; Fri, 7 Aug 2020 06:40:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEbG/v6eTLjrF8UO0bM6XbEmq8c46FQdlGpzkuTEfRS/YXN/QaVFdlrotwhRID7VaWoXwA X-Received: by 2002:a17:906:7d90:: with SMTP id v16mr9195596ejo.27.1596807602429; Fri, 07 Aug 2020 06:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596807602; cv=none; d=google.com; s=arc-20160816; b=QaJxp1/imW4Aq51CUnRf65AHvciFJOvEVOf9F9/jxXaziorBnW4VWkRCc+d7p9iipF CaNiNBnlYLzUd9XM73JxhT9a9sbd1IGYq4qa7FBRTrxqXXmbGePNWOgefzqJmUxkLaJ5 +SNtylwPvJbgmXFx5/SENSV1JtLJMc0mKJXeifUK4NBPMOXWXyrCDxkvwA9eSbjlMWoU ZFL3W5fOL+SK2VDZz982Og3rl7jGoFw/PBR8bHw1T9okR+Wkfh3VD4bxl+2I6ou5amR/ aOmIInCJqFZB4qVTDAc6CVbL4sxEF+5vepGm2EEpS8UbAkdbE75ek7SXq1z6z4VNkPxJ WdYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=eNlt5+MOMqdMiipq56av3Q5dInH/0IZEcBwwhkePOhw=; b=0g81WNSiVXWV28li4nluo1xyoRaVkKT5eZCoxyC7/fVGPwFd9qwWd49KiwcNPAaCis z/NQ0nFCHUvwqXBvOGAbJVcorGxb+gFEzlFmo0cXcpdaItM/6K9BpYee+cK2dV3Ouy4o wi4vAyyiG//NXggUr1blX7MxoVOcRKe6g0gzNCQJFoiz009JtHL1fdqzyvoe5vbRYSHS 2qPLXR3OJ8eVOkX0HevttRiCljcIgy6TcD4WQRMEVTeFeYiCI9aBCY9SJyqR9qPizNCp qSE7fyn1TluQ1fwH6wPAfNcNigWeGsu4PCBDBNiFzPEsm6WkrIG33iAWJPPI4IhLNEno cKFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=jooGZOBZ; 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 x10si5154871ejv.339.2020.08.07.06.39.39; Fri, 07 Aug 2020 06:40:02 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=jooGZOBZ; 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 S1726224AbgHGNjC (ORCPT + 99 others); Fri, 7 Aug 2020 09:39:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbgHGNjB (ORCPT ); Fri, 7 Aug 2020 09:39:01 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 421B8C061574; Fri, 7 Aug 2020 06:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=eNlt5+MOMqdMiipq56av3Q5dInH/0IZEcBwwhkePOhw=; b=jooGZOBZPN+/zhWloZREEQs9Qe 1Gm0HEqpmKTnkfVygGtCjNGPDIVzbn6Oy4iJaZzm2CfGsgeL8I6RGXh+QirerafkOCyyFLowQfn04 IChcKEfRifcIOwSxygkNiijBPFeNHpOZTqM6nCUYljV7yii6nwcVfTblozH6g8PM6Q312CvbDI25M zjBglzIXAyMENEhkum19A1pCMt7D7s7lweM2Z4sd2VbM7V6c6Cd5CwISpe/CWHJm+3fcz7fTwgtvK Rlxfs1dl7r8mlxzgjjjbi+UlFk1MHOgX7V6pvrUvfVUZV9ivnPN/+OOwdWfrzlX5EzJ1coyIw+I7X K4lH3vDg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k42aH-0003o5-B8; Fri, 07 Aug 2020 13:38:57 +0000 Date: Fri, 7 Aug 2020 14:38:57 +0100 From: Matthew Wilcox To: Shiyang Ruan 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: <20200807133857.GC17456@casper.infradead.org> References: <20200807131336.318774-1-ruansy.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200807131336.318774-1-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 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.