From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: [PATCH v9] dax, dm: introduce ->fs_{claim, release}() dax_device infrastructure Date: Tue, 3 Apr 2018 17:13:20 -0400 Message-ID: <20180403211320.GA7835@redhat.com> References: <152278769715.7139.9560094354006725491.stgit@dwillia2-desk3.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <152278769715.7139.9560094354006725491.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Jan Kara , Matthew Wilcox , linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, =?iso-8859-1?B?Suly9G1l?= Glisse , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christoph Hellwig , Alasdair Kergon List-Id: dm-devel.ids On Tue, Apr 03 2018 at 4:36pm -0400, Dan Williams wrote: > In preparation for allowing filesystems to augment the dev_pagemap > associated with a dax_device, add an ->fs_claim() callback. The > ->fs_claim() callback is leveraged by the device-mapper dax > implementation to iterate all member devices in the map and repeat the > claim operation across the array. > = > In order to resolve collisions between filesystem operations and DMA to > DAX mapped pages we need a callback when DMA completes. With a callback > we can hold off filesystem operations while DMA is in-flight and then > resume those operations when the last put_page() occurs on a DMA page. > The ->fs_claim() operation arranges for this callback to be registered, > although that implementation is saved for a later patch. > = > Cc: Alasdair Kergon > Cc: Mike Snitzer > Cc: Matthew Wilcox > Cc: Ross Zwisler > Cc: "J=E9r=F4me Glisse" > Cc: Christoph Hellwig > Cc: Jan Kara > Signed-off-by: Dan Williams > --- > Changes since v8: > * make __fs_dax_claim and __fs_dax_release private to > drivers/dax/super.c > = > * rename dm_dax_iterate to dm_dax_interate_devices (Mike) > = > * drop the return value from dm_dax_interate_devices since nothing uses > it (Mike) Acked-by: Mike Snitzer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BFC8D226C7C3A for ; Tue, 3 Apr 2018 14:13:22 -0700 (PDT) Date: Tue, 3 Apr 2018 17:13:20 -0400 From: Mike Snitzer Subject: Re: [PATCH v9] dax, dm: introduce ->fs_{claim, release}() dax_device infrastructure Message-ID: <20180403211320.GA7835@redhat.com> References: <152278769715.7139.9560094354006725491.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <152278769715.7139.9560094354006725491.stgit@dwillia2-desk3.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Jan Kara , Matthew Wilcox , linux-nvdimm@lists.01.org, dm-devel@redhat.com, =?iso-8859-1?B?Suly9G1l?= Glisse , linux-fsdevel@vger.kernel.org, Christoph Hellwig , Alasdair Kergon List-ID: On Tue, Apr 03 2018 at 4:36pm -0400, Dan Williams wrote: > In preparation for allowing filesystems to augment the dev_pagemap > associated with a dax_device, add an ->fs_claim() callback. The > ->fs_claim() callback is leveraged by the device-mapper dax > implementation to iterate all member devices in the map and repeat the > claim operation across the array. > = > In order to resolve collisions between filesystem operations and DMA to > DAX mapped pages we need a callback when DMA completes. With a callback > we can hold off filesystem operations while DMA is in-flight and then > resume those operations when the last put_page() occurs on a DMA page. > The ->fs_claim() operation arranges for this callback to be registered, > although that implementation is saved for a later patch. > = > Cc: Alasdair Kergon > Cc: Mike Snitzer > Cc: Matthew Wilcox > Cc: Ross Zwisler > Cc: "J=E9r=F4me Glisse" > Cc: Christoph Hellwig > Cc: Jan Kara > Signed-off-by: Dan Williams > --- > Changes since v8: > * make __fs_dax_claim and __fs_dax_release private to > drivers/dax/super.c > = > * rename dm_dax_iterate to dm_dax_interate_devices (Mike) > = > * drop the return value from dm_dax_interate_devices since nothing uses > it (Mike) Acked-by: Mike Snitzer _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:41728 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751469AbeDCVNV (ORCPT ); Tue, 3 Apr 2018 17:13:21 -0400 Date: Tue, 3 Apr 2018 17:13:20 -0400 From: Mike Snitzer To: Dan Williams Cc: Alasdair Kergon , Matthew Wilcox , Ross Zwisler , =?iso-8859-1?B?Suly9G1l?= Glisse , Christoph Hellwig , Jan Kara , linux-nvdimm@lists.01.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com Subject: Re: [PATCH v9] dax, dm: introduce ->fs_{claim, release}() dax_device infrastructure Message-ID: <20180403211320.GA7835@redhat.com> References: <152278769715.7139.9560094354006725491.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <152278769715.7139.9560094354006725491.stgit@dwillia2-desk3.amr.corp.intel.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Apr 03 2018 at 4:36pm -0400, Dan Williams wrote: > In preparation for allowing filesystems to augment the dev_pagemap > associated with a dax_device, add an ->fs_claim() callback. The > ->fs_claim() callback is leveraged by the device-mapper dax > implementation to iterate all member devices in the map and repeat the > claim operation across the array. > > In order to resolve collisions between filesystem operations and DMA to > DAX mapped pages we need a callback when DMA completes. With a callback > we can hold off filesystem operations while DMA is in-flight and then > resume those operations when the last put_page() occurs on a DMA page. > The ->fs_claim() operation arranges for this callback to be registered, > although that implementation is saved for a later patch. > > Cc: Alasdair Kergon > Cc: Mike Snitzer > Cc: Matthew Wilcox > Cc: Ross Zwisler > Cc: "J�r�me Glisse" > Cc: Christoph Hellwig > Cc: Jan Kara > Signed-off-by: Dan Williams > --- > Changes since v8: > * make __fs_dax_claim and __fs_dax_release private to > drivers/dax/super.c > > * rename dm_dax_iterate to dm_dax_interate_devices (Mike) > > * drop the return value from dm_dax_interate_devices since nothing uses > it (Mike) Acked-by: Mike Snitzer