From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20171023071835.67ee5210@mschwideX1> References: <150846713528.24336.4459262264611579791.stgit@dwillia2-desk3.amr.corp.intel.com> <150846714747.24336.14704246566580871364.stgit@dwillia2-desk3.amr.corp.intel.com> <20171020075735.GA14378@lst.de> <20171020162933.GA26320@lst.de> <20171023071835.67ee5210@mschwideX1> From: Dan Williams Date: Mon, 23 Oct 2017 01:55:20 -0700 Message-ID: Subject: Re: [PATCH v3 02/13] dax: require 'struct page' for filesystem dax Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org To: Martin Schwidefsky Cc: Christoph Hellwig , Andrew Morton , Jan Kara , "linux-nvdimm@lists.01.org" , Benjamin Herrenschmidt , Heiko Carstens , "linux-kernel@vger.kernel.org" , linux-xfs@vger.kernel.org, Linux MM , Jeff Moyer , Paul Mackerras , Michael Ellerman , linux-fsdevel , Ross Zwisler , Gerald Schaefer List-ID: On Sun, Oct 22, 2017 at 10:18 PM, Martin Schwidefsky wrote: > On Fri, 20 Oct 2017 18:29:33 +0200 > Christoph Hellwig wrote: > >> On Fri, Oct 20, 2017 at 08:23:02AM -0700, Dan Williams wrote: >> > Yes, however it seems these drivers / platforms have been living with >> > the lack of struct page for a long time. So they either don't use DAX, >> > or they have a constrained use case that never triggers >> > get_user_pages(). If it is the latter then they could introduce a new >> > configuration option that bypasses the pfn_t_devmap() check in >> > bdev_dax_supported() and fix up the get_user_pages() paths to fail. >> > So, I'd like to understand how these drivers have been using DAX >> > support without struct page to see if we need a workaround or we can >> > go ahead delete this support. If the usage is limited to >> > execute-in-place perhaps we can do a constrained ->direct_access() for >> > just that case. >> >> For axonram I doubt anyone is using it any more - it was a very for >> the IBM Cell blades, which were produce=D1=95 in a rather limited number= . >> And Cell basically seems to be dead as far as I can tell. >> >> For S/390 Martin might be able to help out what the status of xpram >> in general and DAX support in particular is. > > The goes back to the time where DAX was called XIP. The initial design > point has been *not* to have struct pages for a large read-only memory > area. There is a block device driver for z/VM that maps a DCSS segment > somewhere in memore (no struct page!) with e.g. the complete /usr > filesystem. The xpram driver is a different beast and has nothing to > do with XIP/DAX. > > Now, if any there are very few users of the dcssblk driver out there. > The idea to save a few megabyte for /usr never really took of. > > We have to look at our get_user_pages() implementation to see how hard > it would be to make it fail if the target address is for an area without > struct pages. For read-only memory I think we can enable a subset of DAX, and explicitly turn off the paths that require get_user_pages(). However, I wonder if anyone has tested DAX with dcssblk because fork() requires get_user_pages()? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751270AbdJWIzY (ORCPT ); Mon, 23 Oct 2017 04:55:24 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:55765 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751113AbdJWIzW (ORCPT ); Mon, 23 Oct 2017 04:55:22 -0400 X-Google-Smtp-Source: ABhQp+Q7A5WcG5Tb/Z/LTeQzE5sCBdQbUEDfTpdHqbmr9Gv4MhbRRkikw81OzHGDTu6AkKYkR66oSctx5DF3qp1f6Os= MIME-Version: 1.0 In-Reply-To: <20171023071835.67ee5210@mschwideX1> References: <150846713528.24336.4459262264611579791.stgit@dwillia2-desk3.amr.corp.intel.com> <150846714747.24336.14704246566580871364.stgit@dwillia2-desk3.amr.corp.intel.com> <20171020075735.GA14378@lst.de> <20171020162933.GA26320@lst.de> <20171023071835.67ee5210@mschwideX1> From: Dan Williams Date: Mon, 23 Oct 2017 01:55:20 -0700 Message-ID: Subject: Re: [PATCH v3 02/13] dax: require 'struct page' for filesystem dax To: Martin Schwidefsky Cc: Christoph Hellwig , Andrew Morton , Jan Kara , "linux-nvdimm@lists.01.org" , Benjamin Herrenschmidt , Heiko Carstens , "linux-kernel@vger.kernel.org" , linux-xfs@vger.kernel.org, Linux MM , Jeff Moyer , Paul Mackerras , Michael Ellerman , linux-fsdevel , Ross Zwisler , Gerald Schaefer Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v9N8tSen021616 On Sun, Oct 22, 2017 at 10:18 PM, Martin Schwidefsky wrote: > On Fri, 20 Oct 2017 18:29:33 +0200 > Christoph Hellwig wrote: > >> On Fri, Oct 20, 2017 at 08:23:02AM -0700, Dan Williams wrote: >> > Yes, however it seems these drivers / platforms have been living with >> > the lack of struct page for a long time. So they either don't use DAX, >> > or they have a constrained use case that never triggers >> > get_user_pages(). If it is the latter then they could introduce a new >> > configuration option that bypasses the pfn_t_devmap() check in >> > bdev_dax_supported() and fix up the get_user_pages() paths to fail. >> > So, I'd like to understand how these drivers have been using DAX >> > support without struct page to see if we need a workaround or we can >> > go ahead delete this support. If the usage is limited to >> > execute-in-place perhaps we can do a constrained ->direct_access() for >> > just that case. >> >> For axonram I doubt anyone is using it any more - it was a very for >> the IBM Cell blades, which were produceѕ in a rather limited number. >> And Cell basically seems to be dead as far as I can tell. >> >> For S/390 Martin might be able to help out what the status of xpram >> in general and DAX support in particular is. > > The goes back to the time where DAX was called XIP. The initial design > point has been *not* to have struct pages for a large read-only memory > area. There is a block device driver for z/VM that maps a DCSS segment > somewhere in memore (no struct page!) with e.g. the complete /usr > filesystem. The xpram driver is a different beast and has nothing to > do with XIP/DAX. > > Now, if any there are very few users of the dcssblk driver out there. > The idea to save a few megabyte for /usr never really took of. > > We have to look at our get_user_pages() implementation to see how hard > it would be to make it fail if the target address is for an area without > struct pages. For read-only memory I think we can enable a subset of DAX, and explicitly turn off the paths that require get_user_pages(). However, I wonder if anyone has tested DAX with dcssblk because fork() requires get_user_pages()?