Re: [PATCH] MAINTAINERS: Update filesystem-dax and NVDIMM entries

2019-01-24 Thread Ira Weiny
ice-DAX > sub-systems. > > The linux-nvdimm mailing hosts a patchwork instance for both DAX and > NVDIMM patches. > > Cc: Jan Kara > Cc: Ira Weiny > Cc: Ross Zwisler > Cc: Keith Busch > Cc: Matthew Wilcox > Signed-off-by: Dan Williams Acked-by: Ira Weiny > ---

Re: [PATCH 6/6] mm/devm_memremap_pages: Fix final page put race

2019-03-29 Thread Ira Weiny
devm_memremap_pages() users: pmem, devdax, hmm, and p2pdma. > > Reported-by: Logan Gunthorpe > Fixes: 41e94a851304 ("add devm_memremap_pages") > Cc: Ira Weiny > Cc: Bjorn Helgaas > Cc: "Jérôme Glisse" > Cc: Christoph Hellwig > Signed-off-by: Dan

Re: [PATCH] libnvdimm, pmem: fix a possible OOB access when read and write pmem

2019-04-04 Thread Ira Weiny
THP)" > Co-developed-by: Liang ZhiCheng > Signed-off-by: Liang ZhiCheng > Signed-off-by: Li RongQing Reviewed-by: Ira Weiny > --- > drivers/nvdimm/pmem.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/nvdimm/pmem.c b/drivers

[PATCH] ndctl: Generalized make-git-snapshot.sh

2019-02-15 Thread ira . weiny
From: Ira Weiny make-git-snapshot.sh made an assumption of the git tree location. Furthermore, it assumed the user has an rpmbuild environment directory structure set up. Enhance the script to figure out where in what location it has been cloned and create the rpmbuild directory if the user

Re: [ndctl PATCH v2 1/3] autoconf: print more possible package names for

2019-02-15 Thread Ira Weiny
78b44275 ("ndctl: add passphrase management commands") > Reviewed-by: Dan Williams > Signed-off-by: Robert Elliott V2 Reviewed-by: Ira Weiny > --- > configure.ac | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/configure.ac b/configure.ac

Re: [PATCH] ndctl: Generalized make-git-snapshot.sh

2019-02-15 Thread Ira Weiny
On Fri, Feb 15, 2019 at 11:31:46AM -0800, Dan Williams wrote: > On Fri, Feb 15, 2019 at 11:21 AM wrote: > > > > From: Ira Weiny > > > > make-git-snapshot.sh made an assumption of the git tree location. > > > > Furthermore, it assumed the user has an rpmbu

[PATCH V2] ndctl: Generalized make-git-snapshot.sh

2019-02-15 Thread ira . weiny
From: Ira Weiny make-git-snapshot.sh made an assumption of the git tree location. Furthermore, it assumed the user has an rpmbuild environment directory structure set up. Enhance the script to figure out where in what location it has been cloned and setup the rpmbuild tree if the user does

[PATCH V3] ndctl: Generalized make-git-snapshot.sh

2019-02-15 Thread ira . weiny
From: Ira Weiny make-git-snapshot.sh made an assumption of the git tree location. Furthermore, it assumed the user has an rpmbuild environment directory structure set up. Enhance the script to error out if not run in the root of the git tree and create the output directory if the user does

Re: [PATCH V2] ndctl: Generalized make-git-snapshot.sh

2019-02-15 Thread Ira Weiny
On Fri, Feb 15, 2019 at 01:01:27PM -0800, 'Vishal Verma' wrote: > > On Fri, 2019-02-15 at 12:06 -0800, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > make-git-snapshot.sh made an assumption of the git tree location. > > > > Furthermore, it assumed

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-07 Thread Ira Weiny
On Fri, Jun 07, 2019 at 09:17:29AM -0300, Jason Gunthorpe wrote: > On Fri, Jun 07, 2019 at 12:36:36PM +0200, Jan Kara wrote: > > > Because the pins would be invisible to sysadmin from that point on. > > It is not invisible, it just shows up in a rdma specific kernel > interface. You have to use

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-07 Thread Ira Weiny
On Fri, Jun 07, 2019 at 01:04:26PM +0200, Jan Kara wrote: > On Thu 06-06-19 15:03:30, Ira Weiny wrote: > > On Thu, Jun 06, 2019 at 12:42:03PM +0200, Jan Kara wrote: > > > On Wed 05-06-19 18:45:33, ira.we...@intel.com wrote: > > > > From: Ira Weiny > > >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-06 Thread Ira Weiny
On Thu, Jun 06, 2019 at 04:51:15PM -0300, Jason Gunthorpe wrote: > On Thu, Jun 06, 2019 at 12:42:03PM +0200, Jan Kara wrote: > > > So I'd like to actually mandate that you *must* hold the file lease until > > you unpin all pages in the given range (not just that you have an option to > > hold a

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-06 Thread Ira Weiny
On Thu, Jun 06, 2019 at 03:03:30PM -0700, 'Ira Weiny' wrote: > On Thu, Jun 06, 2019 at 12:42:03PM +0200, Jan Kara wrote: > > On Wed 05-06-19 18:45:33, ira.we...@intel.com wrote: > > > From: Ira Weiny > > > > > > ... V1,000,000 ;-) > > >

[PATCH RFC 09/10] fs/xfs: Fail truncate if pages are GUP pinned

2019-06-05 Thread ira . weiny
From: Ira Weiny If pages are actively gup pinned fail the truncate operation. To support an application who wishes to removing a pin upon SIGIO reception we must change the order of breaking layout leases with respect to DAX layout leases. Check for a GUP pin on the page being truncated

[PATCH RFC 02/10] fs/locks: Export F_LAYOUT lease to user space

2019-06-05 Thread ira . weiny
From: Ira Weiny GUP longterm pins of non-pagecache file system pages (eg FS DAX) are currently disallowed because they are unsafe. The danger for pinning these pages comes from the fact that hole punch and/or truncate of those files results in the pages being mapped and pinned by a user space

[PATCH RFC 01/10] fs/locks: Add trace_leases_conflict

2019-06-05 Thread ira . weiny
From: Ira Weiny Signed-off-by: Ira Weiny --- fs/locks.c | 20 ++- include/trace/events/filelock.h | 35 + 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/fs/locks.c b/fs/locks.c index ec1e4a5df629

[PATCH RFC 10/10] mm/gup: Remove FOLL_LONGTERM DAX exclusion

2019-06-05 Thread ira . weiny
From: Ira Weiny Now that there is a mechanism for users to safely take LONGTERM pins on FS DAX pages, remove the FS DAX exclusion from GUP with FOLL_LONGTERM. Special processing remains in effect for CONFIG_CMA Signed-off-by: Ira Weiny --- mm/gup.c | 78

[PATCH RFC 03/10] mm/gup: Pass flags down to __gup_device_huge* calls

2019-06-05 Thread ira . weiny
From: Ira Weiny In order to support checking for a layout lease on a FS DAX inode these calls need to know if FOLL_LONGTERM was specified. Prepare for this with this patch. Signed-off-by: Ira Weiny --- mm/gup.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions

[PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-05 Thread ira . weiny
From: Ira Weiny ... V1,000,000 ;-) Pre-requisites: John Hubbard's put_user_pages() patch series.[1] Jan Kara's ext4_break_layouts() fixes[2] Based on the feedback from LSFmm and the LWN article which resulted. I've decided to take a slightly different tack on this problem

[PATCH RFC 04/10] mm/gup: Ensure F_LAYOUT lease is held prior to GUP'ing pages

2019-06-05 Thread ira . weiny
From: Ira Weiny On FS DAX files users must inform the file system they intend to take long term GUP pins on the file pages. Failure to do so should result in an error. Ensure that a F_LAYOUT lease exists at the time the GUP call is made. If not return EPERM. Signed-off-by: Ira Weiny --- fs

[PATCH RFC 06/10] fs/ext4: Teach dax_layout_busy_page() to operate on a sub-range

2019-06-05 Thread ira . weiny
From: Ira Weiny Callers of dax_layout_busy_page() are only rarely operating on the entire file of concern. Teach dax_layout_busy_page() to operate on a sub-range of the address_space provided. Specifying 0 - ULONG_MAX however, will continue to operate on the "entire file" and XFS is

[PATCH RFC 05/10] fs/ext4: Teach ext4 to break layout leases

2019-06-05 Thread ira . weiny
From: Ira Weiny ext4 needs to break a layout lease if it is held to inform a user holding a layout lease that a truncate is about to happen. This allows the user knowledge of, and choice in how to handle, some other thread attempting to modify a file they are actively using. Split out

[PATCH RFC 07/10] fs/ext4: Fail truncate if pages are GUP pinned

2019-06-05 Thread ira . weiny
From: Ira Weiny If pages are actively gup pinned fail the truncate operation. Signed-off-by: Ira Weiny --- fs/ext4/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 75f543f384e4..1ded83ec08c0 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4

[PATCH RFC 08/10] fs/xfs: Teach xfs to use new dax_layout_busy_page()

2019-06-05 Thread ira . weiny
From: Ira Weiny dax_layout_busy_page() can now operate on a sub-range of the address_space provided. Have xfs specify the sub range to dax_layout_busy_page() Signed-off-by: Ira Weiny --- fs/xfs/xfs_file.c | 19 +-- fs/xfs/xfs_inode.h | 5 +++-- fs/xfs/xfs_ioctl.c | 15

Re: [PATCH RFC 07/10] fs/ext4: Fail truncate if pages are GUP pinned

2019-06-06 Thread Ira Weiny
On Thu, Jun 06, 2019 at 12:58:55PM +0200, Jan Kara wrote: > On Wed 05-06-19 18:45:40, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > If pages are actively gup pinned fail the truncate operation. > > > > Signed-off-by: Ira Weiny > > --- > >

Re: [PATCH RFC 03/10] mm/gup: Pass flags down to __gup_device_huge* calls

2019-06-06 Thread Ira Weiny
On Wed, Jun 05, 2019 at 11:18:19PM -0700, Christoph Hellwig wrote: > On Wed, Jun 05, 2019 at 06:45:36PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > In order to support checking for a layout lease on a FS DAX inode these > > calls need to know if

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-06 Thread Ira Weiny
On Wed, Jun 05, 2019 at 10:52:12PM -0700, John Hubbard wrote: > On 6/5/19 6:45 PM, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > ... V1,000,000 ;-) > > > > Pre-requisites: > > John Hubbard's put_user_pages() patch series.[1] > >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-06 Thread Ira Weiny
On Thu, Jun 06, 2019 at 12:42:03PM +0200, Jan Kara wrote: > On Wed 05-06-19 18:45:33, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > ... V1,000,000 ;-) > > > > Pre-requisites: > > John Hubbard's put_user_pages() patch series.[1] > >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-13 Thread Ira Weiny
On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote: > On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > > On Sat, Jun 08, 2019 at 10:10:36AM +1000, Dave Chinner wrote: > > > On Fri, Jun 07, 2019 at 11:25:35AM -0700, Ira Weiny wrote: > > > > A

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-13 Thread Ira Weiny
On Thu, Jun 13, 2019 at 10:55:52AM +1000, Dave Chinner wrote: > On Wed, Jun 12, 2019 at 04:30:24PM -0700, Ira Weiny wrote: > > On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > > > On Sat, Jun 08, 2019 at 10:10:36AM +1000, Dave Chinner wrote: > > > >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-13 Thread Ira Weiny
On Thu, Jun 13, 2019 at 08:27:55AM -0700, Matthew Wilcox wrote: > On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote: > > e.g. Process A has an exclusive layout lease on file F. It does an > > IO to file F. The filesystem IO path checks that Process A owns the > > lease on the file and

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-12 Thread Ira Weiny
On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > On Sat, Jun 08, 2019 at 10:10:36AM +1000, Dave Chinner wrote: > > On Fri, Jun 07, 2019 at 11:25:35AM -0700, Ira Weiny wrote: > > > Are you suggesting that we have something like this from user space? >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-12 Thread Ira Weiny
On Wed, Jun 12, 2019 at 03:54:19PM -0700, Dan Williams wrote: > On Wed, Jun 12, 2019 at 3:12 PM Ira Weiny wrote: > > > > On Wed, Jun 12, 2019 at 04:14:21PM -0300, Jason Gunthorpe wrote: > > > On Wed, Jun 12, 2019 at 02:09:07PM +0200, Jan Kara wrote: > > >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-12 Thread Ira Weiny
On Wed, Jun 12, 2019 at 04:14:21PM -0300, Jason Gunthorpe wrote: > On Wed, Jun 12, 2019 at 02:09:07PM +0200, Jan Kara wrote: > > On Wed 12-06-19 08:47:21, Jason Gunthorpe wrote: > > > On Wed, Jun 12, 2019 at 12:29:17PM +0200, Jan Kara wrote: > > > > > > > > > The main objection to the current ODP

Re: dev_pagemap related cleanups

2019-06-13 Thread Ira Weiny
On Thu, Jun 13, 2019 at 08:40:46PM +, Jason Gunthorpe wrote: > On Thu, Jun 13, 2019 at 11:27:39AM -0700, Dan Williams wrote: > > On Thu, Jun 13, 2019 at 2:43 AM Christoph Hellwig wrote: > > > > > > Hi Dan, Jérôme and Jason, > > > > > > below is a series that cleans up the dev_pagemap

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-08 Thread Ira Weiny
On Sat, Jun 08, 2019 at 10:10:36AM +1000, Dave Chinner wrote: > On Fri, Jun 07, 2019 at 11:25:35AM -0700, Ira Weiny wrote: > > On Fri, Jun 07, 2019 at 01:04:26PM +0200, Jan Kara wrote: > > > On Thu 06-06-19 15:03:30, Ira Weiny wrote: > > > > On Thu, Jun 06, 2019 at 12

Re: [PATCH RFC 02/10] fs/locks: Export F_LAYOUT lease to user space

2019-06-11 Thread Ira Weiny
On Sun, Jun 09, 2019 at 09:00:24AM -0400, Jeff Layton wrote: > On Wed, 2019-06-05 at 18:45 -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > GUP longterm pins of non-pagecache file system pages (eg FS DAX) are > > currently disallowed because they are

Re: [PATCH 11/25] memremap: lift the devmap_enable manipulation into devm_memremap_pages

2019-06-26 Thread Ira Weiny
; > +static atomic_t devmap_managed_enable; > + > +static void devmap_managed_enable_put(void *data) > +{ > + if (atomic_dec_and_test(_managed_enable)) > + static_branch_disable(_managed_key); > +} > + > +static int devmap_managed_enable_get(struct device *

Re: [PATCH 23/25] mm: sort out the DEVICE_PRIVATE Kconfig mess

2019-06-26 Thread Ira Weiny
ny setups, > and depend on it instead. > > Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny > --- > drivers/gpu/drm/nouveau/Kconfig | 2 +- > mm/Kconfig | 5 ++--- > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/d

Re: [PATCH 15/25] memremap: provide an optional internal refcount in struct dev_pagemap

2019-06-26 Thread Ira Weiny
TR(-EINVAL); > + if (!pgmap->ref) { > + if (pgmap->ops && (pgmap->ops->kill || pgmap->ops->cleanup)) > + return ERR_PTR(-EINVAL); > + > + init_completion(>done); > + error = percpu_ref_init(>int

Re: [PATCH 16/25] device-dax: use the dev_pagemap internal refcount

2019-06-26 Thread Ira Weiny
On Wed, Jun 26, 2019 at 02:27:15PM +0200, Christoph Hellwig wrote: > The functionality is identical to the one currently open coded in > device-dax. > > Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny > --- > drivers/dax/dax-private.h | 4 > drivers/d

Re: [PATCH 04/25] mm: remove MEMORY_DEVICE_PUBLIC support

2019-06-26 Thread Ira Weiny
On Wed, Jun 26, 2019 at 10:14:45AM -0700, 'Ira Weiny' wrote: > On Wed, Jun 26, 2019 at 09:00:47AM -0700, Dan Williams wrote: > > [ add Ira ] > > > > On Wed, Jun 26, 2019 at 5:27 AM Christoph Hellwig wrote: > > > > > > The code hasn't been used sinc

Re: [PATCH 14/25] memremap: replace the altmap_valid field with a PGMAP_ALTMAP_VALID flag

2019-06-26 Thread Ira Weiny
map using > it. > > Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny > --- > arch/powerpc/mm/mem.c | 10 +- > arch/x86/mm/init_64.c | 8 ++-- > drivers/nvdimm/pfn_devs.c | 3 +-- > drivers/nvdimm/pmem.c | 1 - > include/linux/memremap.h |

Re: [PATCH 24/25] mm: remove the HMM config option

2019-06-26 Thread Ira Weiny
> pretty portable. > > Signed-off-by: Christoph Hellwig Seems reasonable to me. Reviewed-by: Ira Weiny > --- > drivers/gpu/drm/nouveau/Kconfig | 3 +-- > include/linux/hmm.h | 5 + > include/linux/mm_types.h| 2 +- > mm/

Re: [PATCH 17/25] PCI/P2PDMA: use the dev_pagemap internal refcount

2019-06-26 Thread Ira Weiny
On Wed, Jun 26, 2019 at 02:27:16PM +0200, Christoph Hellwig wrote: > The functionality is identical to the one currently open coded in > p2pdma.c. > > Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny > --- > drivers/pci/p2pdma.c | 57 ---

Re: [PATCH 08/25] memremap: validate the pagemap type passed to devm_memremap_pages

2019-06-26 Thread Ira Weiny
ice dax gets replaced with an explicit MEMORY_DEVICE_DEVDAX type. > > Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny > --- > drivers/dax/device.c | 1 + > include/linux/memremap.h | 8 > kernel/memremap.c| 22 ++ >

Re: [PATCH 04/25] mm: remove MEMORY_DEVICE_PUBLIC support

2019-06-26 Thread Ira Weiny
On Wed, Jun 26, 2019 at 09:00:47AM -0700, Dan Williams wrote: > [ add Ira ] > > On Wed, Jun 26, 2019 at 5:27 AM Christoph Hellwig wrote: > > > > The code hasn't been used since it was added to the tree, and doesn't > > appear to actually be usable. > > > > Signed-off-by: Christoph Hellwig > >

Re: [RFC PATCH v2 16/19] RDMA/uverbs: Add back pointer to system file object

2019-08-13 Thread Ira Weiny
On Tue, Aug 13, 2019 at 08:48:42AM -0300, Jason Gunthorpe wrote: > On Mon, Aug 12, 2019 at 02:15:37PM -0700, Ira Weiny wrote: > > On Mon, Aug 12, 2019 at 02:56:15PM -0300, Jason Gunthorpe wrote: > > > On Mon, Aug 12, 2019 at 10:28:27AM -0700, Ira Weiny wrote: > > > >

Re: [RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-13 Thread Ira Weiny
On Tue, Aug 13, 2019 at 08:47:06AM -0300, Jason Gunthorpe wrote: > On Mon, Aug 12, 2019 at 02:48:55PM -0700, Ira Weiny wrote: > > On Mon, Aug 12, 2019 at 09:28:14AM -0300, Jason Gunthorpe wrote: > > > On Fri, Aug 09, 2019 at 03:58:29PM -0700, ira.we...@intel.com wrote: >

Re: [RFC PATCH v2 16/19] RDMA/uverbs: Add back pointer to system file object

2019-08-12 Thread Ira Weiny
On Mon, Aug 12, 2019 at 10:00:40AM -0300, Jason Gunthorpe wrote: > On Fri, Aug 09, 2019 at 03:58:30PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > In order for MRs to be tracked against the open verbs context the ufile > > needs to have a poin

Re: [RFC PATCH v2 07/19] fs/xfs: Teach xfs to use new dax_layout_busy_page()

2019-08-12 Thread Ira Weiny
On Sat, Aug 10, 2019 at 09:30:37AM +1000, Dave Chinner wrote: > On Fri, Aug 09, 2019 at 03:58:21PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > dax_layout_busy_page() can now operate on a sub-range of the > > address_space provided. > > &

Re: [RFC PATCH v2 01/19] fs/locks: Export F_LAYOUT lease to user space

2019-08-12 Thread Ira Weiny
On Sat, Aug 10, 2019 at 09:52:31AM +1000, Dave Chinner wrote: > On Fri, Aug 09, 2019 at 03:58:15PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > In order to support an opt-in policy for users to allow long term pins > > of FS DAX pages we need to expo

Re: [RFC PATCH v2 11/19] mm/gup: Pass follow_page_context further down the call stack

2019-08-12 Thread Ira Weiny
On Fri, Aug 09, 2019 at 05:18:31PM -0700, John Hubbard wrote: > On 8/9/19 3:58 PM, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > In preparation for passing more information (vaddr_pin) into > > follow_page_pte(), follow_devmap_pud(), and follow_devmap_pmd().

Re: [RFC PATCH v2 08/19] fs/xfs: Fail truncate if page lease can't be broken

2019-08-12 Thread Ira Weiny
On Sat, Aug 10, 2019 at 09:22:09AM +1000, Dave Chinner wrote: > On Fri, Aug 09, 2019 at 03:58:22PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > If pages are under a lease fail the truncate operation. We change the > > order of > > lease brea

Re: [RFC PATCH v2 16/19] RDMA/uverbs: Add back pointer to system file object

2019-08-13 Thread Ira Weiny
On Tue, Aug 13, 2019 at 03:00:22PM -0300, Jason Gunthorpe wrote: > On Tue, Aug 13, 2019 at 10:41:42AM -0700, Ira Weiny wrote: > > > And I was pretty sure uverbs_destroy_ufile_hw() would take care of (or > > ensure > > that some other thread is) destroying all the

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-16 Thread Ira Weiny
On Thu, Aug 15, 2019 at 03:05:58PM +0200, Jan Kara wrote: > On Wed 14-08-19 11:08:49, Ira Weiny wrote: > > On Wed, Aug 14, 2019 at 12:17:14PM +0200, Jan Kara wrote: > > > Hello! > > > > > > On Fri 09-08-19 15:58:14, ira.we...@int

Re: add a not device managed memremap_pages v2

2019-08-16 Thread Ira Weiny
m_region > - export the memremap_pages and munmap_pages as kvmppc can be a module Except for the questions from Andrew this does not look to change anything so: Reviewed-by: Ira Weiny > ___ > Linux-nvdimm mailing list > Linux-nvdimm@lists.01.org &

Re: [RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-12 Thread Ira Weiny
On Mon, Aug 12, 2019 at 09:28:14AM -0300, Jason Gunthorpe wrote: > On Fri, Aug 09, 2019 at 03:58:29PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > The addition of FOLL_LONGTERM has taken on additional meaning for CMA > > pages. > > > &

Re: [RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-12 Thread Ira Weiny
On Fri, Aug 09, 2019 at 05:09:54PM -0700, John Hubbard wrote: > On 8/9/19 3:58 PM, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > The addition of FOLL_LONGTERM has taken on additional meaning for CMA > > pages. > > > > In addition subsyste

Re: [RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-12 Thread Ira Weiny
On Sun, Aug 11, 2019 at 04:07:23PM -0700, John Hubbard wrote: > On 8/9/19 3:58 PM, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > The addition of FOLL_LONGTERM has taken on additional meaning for CMA > > pages. > > > > In addition subsyste

Re: [RFC PATCH v2 12/19] mm/gup: Prep put_user_pages() to take an vaddr_pin struct

2019-08-12 Thread Ira Weiny
On Fri, Aug 09, 2019 at 05:30:00PM -0700, John Hubbard wrote: > On 8/9/19 3:58 PM, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > Once callers start to use vaddr_pin the put_user_pages calls will need > > to have access to this data coming in. Prep put_use

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-19 Thread Ira Weiny
On Mon, Aug 19, 2019 at 09:38:41AM -0300, Jason Gunthorpe wrote: > On Mon, Aug 19, 2019 at 07:24:09PM +1000, Dave Chinner wrote: > > > So that leaves just the normal close() syscall exit case, where the > > application has full control of the order in which resources are > > released. We've

Re: [RFC PATCH v2 16/19] RDMA/uverbs: Add back pointer to system file object

2019-08-14 Thread Ira Weiny
On Wed, Aug 14, 2019 at 09:23:08AM -0300, Jason Gunthorpe wrote: > On Tue, Aug 13, 2019 at 01:38:59PM -0700, Ira Weiny wrote: > > On Tue, Aug 13, 2019 at 03:00:22PM -0300, Jason Gunthorpe wrote: > > > On Tue, Aug 13, 2019 at 10:41:42AM -0700, Ira Weiny wrote: > > > &g

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-14 Thread Ira Weiny
On Wed, Aug 14, 2019 at 12:17:14PM +0200, Jan Kara wrote: > Hello! > > On Fri 09-08-19 15:58:14, ira.we...@intel.com wrote: > > Pre-requisites > > == > > Based on mmotm tree. > > > > Based on the feedback from LSFmm, the LWN article, the RFC series since > > then, and a ton of

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-16 Thread Ira Weiny
On Fri, Aug 16, 2019 at 12:05:28PM -0700, 'Ira Weiny' wrote: > On Thu, Aug 15, 2019 at 03:05:58PM +0200, Jan Kara wrote: > > On Wed 14-08-19 11:08:49, Ira Weiny wrote: > > > On Wed, Aug 14, 2019 at 12:17:14PM +0200, Jan Kara wrote: > > > > Hello! > > > >

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-21 Thread Ira Weiny
53PM -0700, John Hubbard wrote: > > > > > On 8/19/19 2:24 AM, Dave Chinner wrote: > > > > > > On Mon, Aug 19, 2019 at 08:34:12AM +0200, Jan Kara wrote: > > > > > > > On Sat 17-08-19 12:26:03, Dave Chinner wrote: > > > > > > > > On

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-21 Thread Ira Weiny
On Tue, Aug 20, 2019 at 08:55:15AM -0300, Jason Gunthorpe wrote: > On Tue, Aug 20, 2019 at 11:12:10AM +1000, Dave Chinner wrote: > > On Mon, Aug 19, 2019 at 09:38:41AM -0300, Jason Gunthorpe wrote: > > > On Mon, Aug 19, 2019 at 07:24:09PM +1000, Dave Chinner wrote: > > > > > > > So that leaves

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-21 Thread Ira Weiny
On Wed, Aug 21, 2019 at 03:13:43PM -0300, Jason Gunthorpe wrote: > On Wed, Aug 21, 2019 at 11:02:00AM -0700, Ira Weiny wrote: > > On Tue, Aug 20, 2019 at 08:55:15AM -0300, Jason Gunthorpe wrote: > > > On Tue, Aug 20, 2019 at 11:12:10AM +1000, Dave Chinner wrote: > > > &

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-21 Thread Ira Weiny
On Wed, Aug 21, 2019 at 11:57:03AM -0700, 'Ira Weiny' wrote: > On Wed, Aug 21, 2019 at 03:13:43PM -0300, Jason Gunthorpe wrote: > > On Wed, Aug 21, 2019 at 11:02:00AM -0700, Ira Weiny wrote: > > > On Tue, Aug 20, 2019 at 08:55:15AM -0300, Jason Gunthorpe wrote: > > > &

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-21 Thread Ira Weiny
On Wed, Aug 21, 2019 at 04:48:10PM -0300, Jason Gunthorpe wrote: > On Wed, Aug 21, 2019 at 11:57:03AM -0700, Ira Weiny wrote: > > > > Oh, I didn't think we were talking about that. Hanging the close of > > > the datafile fd contingent on some other FD's closure is a r

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-29 Thread Ira Weiny
On Wed, Aug 28, 2019 at 08:27:23PM -0700, John Hubbard wrote: > On 8/28/19 7:02 PM, Ira Weiny wrote: > > On Mon, Aug 26, 2019 at 03:55:10PM +1000, Dave Chinner wrote: > > > On Fri, Aug 23, 2019 at 10:08:36PM -0700, Ira Weiny wrote: > > > > On Sat, Aug 24, 2019 at

Re: [RFC PATCH v2 02/19] fs/locks: Add Exclusive flag to user Layout lease

2019-08-29 Thread Ira Weiny
Missed this. sorry. On Mon, Aug 26, 2019 at 06:41:07AM -0400, Jeff Layton wrote: > On Thu, 2019-08-15 at 07:56 +1000, Dave Chinner wrote: > > On Wed, Aug 14, 2019 at 10:15:06AM -0400, Jeff Layton wrote: > > > On Fri, 2019-08-09 at 15:58 -0700, ira.we...@intel.com wrote: >

Re: [RFC PATCH v2 06/19] fs/ext4: Teach dax_layout_busy_page() to operate on a sub-range

2019-08-29 Thread Ira Weiny
On Fri, Aug 23, 2019 at 11:18:26AM -0400, Vivek Goyal wrote: > On Fri, Aug 09, 2019 at 03:58:20PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > Callers of dax_layout_busy_page() are only rarely operating on the > > entire file of concern. > >

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-23 Thread Ira Weiny
On Sat, Aug 24, 2019 at 10:11:24AM +1000, Dave Chinner wrote: > On Fri, Aug 23, 2019 at 09:04:29AM -0300, Jason Gunthorpe wrote: > > On Fri, Aug 23, 2019 at 01:23:45PM +1000, Dave Chinner wrote: > > > > > > But the fact that RDMA, and potentially others, can "pass the > > > > pins" to other

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-23 Thread Ira Weiny
On Fri, Aug 23, 2019 at 01:23:45PM +1000, Dave Chinner wrote: > On Wed, Aug 21, 2019 at 01:44:21PM -0700, Ira Weiny wrote: > > On Wed, Aug 21, 2019 at 04:48:10PM -0300, Jason Gunthorpe wrote: > > > On Wed, Aug 21, 2019 at 11:57:03AM -0700, Ira Weiny wrote: > > > >

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-28 Thread Ira Weiny
On Mon, Aug 26, 2019 at 03:55:10PM +1000, Dave Chinner wrote: > On Fri, Aug 23, 2019 at 10:08:36PM -0700, Ira Weiny wrote: > > On Sat, Aug 24, 2019 at 10:11:24AM +1000, Dave Chinner wrote: > > > On Fri, Aug 23, 2019 at 09:04:29AM -0300, Jason Gunthorpe wrote: > > > >

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-23 Thread Ira Weiny
On Fri, Aug 23, 2019 at 10:59:14AM +1000, Dave Chinner wrote: > On Wed, Aug 21, 2019 at 11:02:00AM -0700, Ira Weiny wrote: > > On Tue, Aug 20, 2019 at 08:55:15AM -0300, Jason Gunthorpe wrote: > > > On Tue, Aug 20, 2019 at 11:12:10AM +1000, Dave Chinner wrote: > > > >

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-09-04 Thread Ira Weiny
On Tue, Sep 03, 2019 at 08:26:18AM +1000, Dave Chinner wrote: > On Wed, Aug 28, 2019 at 07:02:31PM -0700, Ira Weiny wrote: > > On Mon, Aug 26, 2019 at 03:55:10PM +1000, Dave Chinner wrote: > > > On Fri, Aug 23, 2019 at 10:08:36PM -0700, Ira Weiny wrote: > > > > On S

Re: [RFC PATCH v2 16/19] RDMA/uverbs: Add back pointer to system file object

2019-09-04 Thread Ira Weiny
On Wed, Aug 14, 2019 at 09:23:08AM -0300, Jason Gunthorpe wrote: > On Tue, Aug 13, 2019 at 01:38:59PM -0700, Ira Weiny wrote: > > On Tue, Aug 13, 2019 at 03:00:22PM -0300, Jason Gunthorpe wrote: > > > On Tue, Aug 13, 2019 at 10:41:42AM -0700, Ira Weiny wrote: > > > &g

[PATCH] nvdimm: Trivial comment fix

2019-09-18 Thread ira . weiny
From: Ira Weiny Signed-off-by: Ira Weiny --- include/linux/nd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/nd.h b/include/linux/nd.h index f778f962d1b6..55c735997805 100644 --- a/include/linux/nd.h +++ b/include/linux/nd.h @@ -147,7 +147,7 @@ static

Re: [PATCH] libnvdimm/nfit_test: Fix acpi_handle redefinition

2019-09-18 Thread Ira Weiny
this by including linux/acpi.h in nfit_test.h, which allows us to > remove both the typedef and the forward declaration of acpi_object. > > Link: https://github.com/ClangBuiltLinux/linux/issues/660 > Signed-off-by: Nathan Chancellor Reviewed-by: Ira Weiny > --- > > I know that

[RFC PATCH v2 09/19] mm/gup: Introduce vaddr_pin structure

2019-08-09 Thread ira . weiny
From: Ira Weiny Some subsystems need to pass owning file information to GUP calls to allow for GUP to associate the "owning file" to any files being pinned within the GUP call. Introduce an object to specify this information and pass it down through some of the GUP call stack.

[RFC PATCH v2 05/19] fs/ext4: Teach ext4 to break layout leases

2019-08-09 Thread ira . weiny
From: Ira Weiny ext4 must attempt to break a layout lease if it is held to know if the layout can be modified. Split out the logic to determine if a mapping is DAX, export it, and then break layout leases if a mapping is DAX. Signed-off-by: Ira Weiny --- Changes from RFC v1: Based

[RFC PATCH v2 03/19] mm/gup: Pass flags down to __gup_device_huge* calls

2019-08-09 Thread ira . weiny
From: Ira Weiny In order to support checking for a layout lease on a FS DAX inode these calls need to know if FOLL_LONGTERM was specified. Signed-off-by: Ira Weiny --- mm/gup.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/mm/gup.c b/mm/gup.c

[RFC PATCH v2 06/19] fs/ext4: Teach dax_layout_busy_page() to operate on a sub-range

2019-08-09 Thread ira . weiny
From: Ira Weiny Callers of dax_layout_busy_page() are only rarely operating on the entire file of concern. Teach dax_layout_busy_page() to operate on a sub-range of the address_space provided. Specifying 0 - ULONG_MAX however, will continue to operate on the "entire file" and XFS is

[RFC PATCH v2 10/19] mm/gup: Pass a NULL vaddr_pin through GUP fast

2019-08-09 Thread ira . weiny
From: Ira Weiny Internally GUP fast needs to know that fast users will not support file pins. Pass NULL for vaddr_pin through the fast call stack so that the pin code can return an error if it encounters file backed memory within the address range. Signed-off-by: Ira Weiny --- mm/gup.c | 65

[RFC PATCH v2 07/19] fs/xfs: Teach xfs to use new dax_layout_busy_page()

2019-08-09 Thread ira . weiny
From: Ira Weiny dax_layout_busy_page() can now operate on a sub-range of the address_space provided. Have xfs specify the sub range to dax_layout_busy_page() Signed-off-by: Ira Weiny --- fs/xfs/xfs_file.c | 19 +-- fs/xfs/xfs_inode.h | 5 +++-- fs/xfs/xfs_ioctl.c | 15

[RFC PATCH v2 08/19] fs/xfs: Fail truncate if page lease can't be broken

2019-08-09 Thread ira . weiny
From: Ira Weiny If pages are under a lease fail the truncate operation. We change the order of lease breaks to directly fail the operation if the lease exists. Select EXPORT_BLOCK_OPS for FS_DAX to ensure that xfs_break_lease_layouts() is defined for FS_DAX as well as pNFS. Signed-off-by: Ira

[RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ;-)

2019-08-09 Thread ira . weiny
From: Ira Weiny Pre-requisites == Based on mmotm tree. Based on the feedback from LSFmm, the LWN article, the RFC series since then, and a ton of scenarios I've worked in my mind and/or tested...[1] Solution summary The real issue is that there is no use

[RFC PATCH v2 13/19] {mm,file}: Add file_pins objects

2019-08-09 Thread ira . weiny
From: Ira Weiny User page pins (aka GUP) needs to track file information of files being pinned by those calls. Depending on the needs of the caller this information is stored in 1 of 2 ways. 1) Some subsystems like RDMA associate GUP pins with file descriptors which can be passed around

[RFC PATCH v2 01/19] fs/locks: Export F_LAYOUT lease to user space

2019-08-09 Thread ira . weiny
From: Ira Weiny In order to support an opt-in policy for users to allow long term pins of FS DAX pages we need to export the LAYOUT lease to user space. This is the first of 2 new lease flags which must be used to allow a long term pin to be made on a file. After the complete series: 0

[RFC PATCH v2 19/19] mm/gup: Remove FOLL_LONGTERM DAX exclusion

2019-08-09 Thread ira . weiny
From: Ira Weiny Now that there is a mechanism for users to safely take LONGTERM pins on FS DAX pages, remove the FS DAX exclusion from the GUP implementation. Special processing remains in effect for CONFIG_CMA NOTE: Some callers still fail because the vaddr_pin information has not been passed

[RFC PATCH v2 14/19] fs/locks: Associate file pins while performing GUP

2019-08-09 Thread ira . weiny
From: Ira Weiny When a file back area is being pinned add the appropriate file pin information to the appropriate file or mm owner. This information can then be used by admins to determine who is causing a failure to change the layout of a file. Signed-off-by: Ira Weiny --- fs/locks.c

[RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-09 Thread ira . weiny
From: Ira Weiny The addition of FOLL_LONGTERM has taken on additional meaning for CMA pages. In addition subsystems such as RDMA require new information to be passed to the GUP interface to track file owning information. As such a simple FOLL_LONGTERM flag is no longer sufficient

[RFC PATCH v2 17/19] RDMA/umem: Convert to vaddr_[pin|unpin]* operations.

2019-08-09 Thread ira . weiny
From: Ira Weiny In order to properly track the pinning information we need to keep a vaddr_pin object around. Store that within the umem object directly. The vaddr_pin object allows the GUP code to associate any files it pins with the RDMA file descriptor associated with this GUP. Furthermore

[RFC PATCH v2 02/19] fs/locks: Add Exclusive flag to user Layout lease

2019-08-09 Thread ira . weiny
From: Ira Weiny Add an exclusive lease flag which indicates that the layout mechanism can not be broken. Exclusive layout leases allow the file system to know that pages may be GUP pined and that attempts to change the layout, ie truncate, should be failed. A process which attempts to break

[RFC PATCH v2 04/19] mm/gup: Ensure F_LAYOUT lease is held prior to GUP'ing pages

2019-08-09 Thread ira . weiny
From: Ira Weiny On FS DAX files users must inform the file system they intend to take long term GUP pins on the file pages. Failure to do so should result in an error. Ensure that a F_LAYOUT lease exists at the time the GUP call is made. If not return EPERM. Signed-off-by: Ira Weiny

[RFC PATCH v2 12/19] mm/gup: Prep put_user_pages() to take an vaddr_pin struct

2019-08-09 Thread ira . weiny
From: Ira Weiny Once callers start to use vaddr_pin the put_user_pages calls will need to have access to this data coming in. Prep put_user_pages() for this data. Signed-off-by: Ira Weiny --- include/linux/mm.h | 20 +--- mm/gup.c | 122

[RFC PATCH v2 11/19] mm/gup: Pass follow_page_context further down the call stack

2019-08-09 Thread ira . weiny
From: Ira Weiny In preparation for passing more information (vaddr_pin) into follow_page_pte(), follow_devmap_pud(), and follow_devmap_pmd(). Signed-off-by: Ira Weiny --- include/linux/huge_mm.h | 17 - mm/gup.c| 31 +++ mm

[RFC PATCH v2 16/19] RDMA/uverbs: Add back pointer to system file object

2019-08-09 Thread ira . weiny
From: Ira Weiny In order for MRs to be tracked against the open verbs context the ufile needs to have a pointer to hand to the GUP code. No references need to be taken as this should be valid for the lifetime of the context. Signed-off-by: Ira Weiny --- drivers/infiniband/core/uverbs.h

  1   2   3   4   5   >