From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 18 May 2018 11:00:55 +0200 From: Jan Kara To: Dan Williams Cc: linux-nvdimm@lists.01.org, Martin Schwidefsky , Heiko Carstens , Michal Hocko , kbuild test robot , Thomas Meyer , Dave Jiang , Christoph Hellwig , =?iso-8859-1?B?Suly9G1l?= Glisse , Jan Kara , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v10] mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS Message-ID: <20180518090055.o2q5wrawk67v6ppr@quack2.suse.cz> References: <152658753673.26786.16458605771414761966.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: <152658753673.26786.16458605771414761966.stgit@dwillia2-desk3.amr.corp.intel.com> Sender: owner-linux-mm@kvack.org List-ID: On Thu 17-05-18 13:06:54, Dan Williams wrote: > In preparation for fixing dax-dma-vs-unmap issues, filesystems need to > be able to rely on the fact that they will get wakeups on dev_pagemap > page-idle events. Introduce MEMORY_DEVICE_FS_DAX and > generic_dax_page_free() as common indicator / infrastructure for dax > filesytems to require. With this change there are no users of the > MEMORY_DEVICE_HOST designation, so remove it. > > The HMM sub-system extended dev_pagemap to arrange a callback when a > dev_pagemap managed page is freed. Since a dev_pagemap page is free / > idle when its reference count is 1 it requires an additional branch to > check the page-type at put_page() time. Given put_page() is a hot-path > we do not want to incur that check if HMM is not in use, so a static > branch is used to avoid that overhead when not necessary. > > Now, the FS_DAX implementation wants to reuse this mechanism for > receiving dev_pagemap ->page_free() callbacks. Rework the HMM-specific > static-key into a generic mechanism that either HMM or FS_DAX code paths > can enable. > > For ARCH=um builds, and any other arch that lacks ZONE_DEVICE support, > care must be taken to compile out the DEV_PAGEMAP_OPS infrastructure. > However, we still need to support FS_DAX in the FS_DAX_LIMITED case > implemented by the s390/dcssblk driver. > > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: Michal Hocko > Reported-by: kbuild test robot > Reported-by: Thomas Meyer > Reported-by: Dave Jiang > Cc: Christoph Hellwig > Cc: "J�r�me Glisse" > Cc: Jan Kara > Signed-off-by: Dan Williams Yeah, it looks simpler than original patches and it looks OK to me. You can add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR