From: Jan Kara <jack@suse.cz> Date: 2016-12-12 16:47:02
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
Changes since v2:
* Added Reviewed-by tags
* Fixed commit message of patch 3
* Slightly simplified dax_iomap_pmd_fault()
* Renamed truncation functions to express better what they do
Changes since v1:
* Rebased on top of patches in mm tree
* Added some Reviewed-by tags
* renamed some functions based on review feedback
Honza
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-12 16:47:03
So far we did not return BH_New buffers from ext2_get_blocks() when we
allocated and zeroed-out a block for DAX inode to avoid racy zeroing in
DAX code. This zeroing is gone these days so we can remove the
workaround.
Reviewed-by: Ross Zwisler <redacted>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ext2/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -754,9 +754,8 @@ static int ext2_get_blocks(struct inode *inode,mutex_unlock(&ei->truncate_mutex);gotocleanup;}-}else{-*new=true;}+*new=true;ext2_splice_branch(inode,iblock,partial,indirect_blks,count);mutex_unlock(&ei->truncate_mutex);
--
2.10.2
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-12 16:47:04
Currently invalidate_inode_pages2_range() and invalidate_mapping_pages()
just delete all exceptional radix tree entries they find. For DAX this
is not desirable as we track cache dirtiness in these entries and when
they are evicted, we may not flush caches although it is necessary. This
can for example manifest when we write to the same block both via mmap
and via write(2) (to different offsets) and fsync(2) then does not
properly flush CPU caches when modification via write(2) was the last
one.
Create appropriate DAX functions to handle invalidation of DAX entries
for invalidate_inode_pages2_range() and invalidate_mapping_pages() and
wire them up into the corresponding mm functions.
Reviewed-by: Ross Zwisler <redacted>
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/dax.c | 71 +++++++++++++++++++++++++++++++++++++++++++-------
include/linux/dax.h | 3 +++
mm/truncate.c | 75 +++++++++++++++++++++++++++++++++++++++++++----------
3 files changed, 125 insertions(+), 24 deletions(-)
@@ -470,7 +514,8 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping,break;if(radix_tree_exceptional_entry(page)){-clear_exceptional_entry(mapping,index,page);+invalidate_exceptional_entry(mapping,index,+page);continue;}
@@ -592,7 +637,9 @@ int invalidate_inode_pages2_range(struct address_space *mapping,break;if(radix_tree_exceptional_entry(page)){-clear_exceptional_entry(mapping,index,page);+if(!invalidate_exceptional_entry2(mapping,+index,page))+ret=-EBUSY;continue;}
--
2.10.2
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-12 16:47:05
Currently dax_iomap_rw() takes care of invalidating page tables and
evicting hole pages from the radix tree when write(2) to the file
happens. This invalidation is only necessary when there is some block
allocation resulting from write(2). Furthermore in current place the
invalidation is racy wrt page fault instantiating a hole page just after
we have invalidated it.
So perform the page invalidation inside dax_iomap_actor() where we can
do it only when really necessary and after blocks have been allocated so
nobody will be instantiating new hole pages anymore.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ross Zwisler <redacted>
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/dax.c | 28 +++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)
--
2.10.2
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-12 16:47:06
The only case when we do not finish the page fault completely is when we
are loading hole pages into a radix tree. Avoid this special case and
finish the fault in that case as well inside the DAX fault handler. It
will allow us for easier iomap handling.
Reviewed-by: Ross Zwisler <redacted>
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/dax.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
@@ -540,15 +540,16 @@ int dax_invalidate_mapping_entry_sync(struct address_space *mapping,*otherwiseitwillsimplyfalloutofthepagecacheundermemory*pressurewithouteverhavingbeendirtied.*/-staticintdax_load_hole(structaddress_space*mapping,void*entry,+staticintdax_load_hole(structaddress_space*mapping,void**entry,structvm_fault*vmf){structpage*page;+intret;/* Hole page already exists? Return it... */-if(!radix_tree_exceptional_entry(entry)){-vmf->page=entry;-returnVM_FAULT_LOCKED;+if(!radix_tree_exceptional_entry(*entry)){+page=*entry;+gotoout;}/* This will replace locked radix tree entry with a hole page */
@@ -556,8 +557,17 @@ static int dax_load_hole(struct address_space *mapping, void *entry,vmf->gfp_mask|__GFP_ZERO);if(!page)returnVM_FAULT_OOM;+out:vmf->page=page;-returnVM_FAULT_LOCKED;+ret=finish_fault(vmf);+vmf->page=NULL;+*entry=page;+if(!ret){+/* Grab reference for PTE that is now referencing the page */+get_page(page);+returnVM_FAULT_NOPAGE;+}+returnret;}staticintcopy_user_dax(structblock_device*bdev,sector_tsector,size_tsize,
--
2.10.2
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-12 16:47:07
Currently ->iomap_begin() handler is called with entry lock held. If the
filesystem held any locks between ->iomap_begin() and ->iomap_end()
(such as ext4 which will want to hold transaction open), this would cause
lock inversion with the iomap_apply() from standard IO path which first
calls ->iomap_begin() and only then calls ->actor() callback which grabs
entry locks for DAX (if it faults when copying from/to user provided
buffers).
Fix the problem by nesting grabbing of entry lock inside ->iomap_begin()
- ->iomap_end() pair.
Reviewed-by: Ross Zwisler <redacted>
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/dax.c | 121 ++++++++++++++++++++++++++++++++++-----------------------------
1 file changed, 66 insertions(+), 55 deletions(-)
@@ -1170,12 +1179,15 @@ int dax_iomap_fault(struct vm_area_struct *vma, struct vm_fault *vmf,}error=dax_insert_mapping(mapping,iomap.bdev,sector,PAGE_SIZE,&entry,vma,vmf);+/* -EBUSY is fine, somebody else faulted on the same PTE */+if(error==-EBUSY)+error=0;break;caseIOMAP_UNWRITTEN:caseIOMAP_HOLE:if(!(vmf->flags&FAULT_FLAG_WRITE)){vmf_ret=dax_load_hole(mapping,&entry,vmf);-gotofinish_iomap;+gotounlock_entry;}/*FALLTHRU*/default:
@@ -1184,30 +1196,25 @@ int dax_iomap_fault(struct vm_area_struct *vma, struct vm_fault *vmf,break;}-finish_iomap:-if(ops->iomap_end){-if(error||(vmf_ret&VM_FAULT_ERROR)){-/* keep previous error */-ops->iomap_end(inode,pos,PAGE_SIZE,0,flags,-&iomap);-}else{-error=ops->iomap_end(inode,pos,PAGE_SIZE,-PAGE_SIZE,flags,&iomap);-}-}+error_unlock_entry:+vmf_ret=dax_fault_return(error)|major;unlock_entry:put_locked_mapping_entry(mapping,vmf->pgoff,entry);-out:-if(error==-ENOMEM)-returnVM_FAULT_OOM|major;-/* -EBUSY is fine, somebody else faulted on the same PTE */-if(error<0&&error!=-EBUSY)-returnVM_FAULT_SIGBUS|major;-if(vmf_ret){-WARN_ON_ONCE(error);/* -EBUSY from ops->iomap_end? */-returnvmf_ret;+finish_iomap:+if(ops->iomap_end){+intcopied=PAGE_SIZE;++if(vmf_ret&VM_FAULT_ERROR)+copied=0;+/*+*Thefaultisdonebynowandthere'snowayback(other+*threadmaybealreadyhappilyusingPTEwehaveinstalled).+*Justignoreerrorfrom->iomap_endsincewecannotdomuch+*withit.+*/+ops->iomap_end(inode,pos,PAGE_SIZE,copied,flags,&iomap);}-returnVM_FAULT_NOPAGE|major;+returnvmf_ret;}EXPORT_SYMBOL_GPL(dax_iomap_fault);
@@ -1332,16 +1339,6 @@ int dax_iomap_pmd_fault(struct vm_area_struct *vma, unsigned long address,gotofallback;/*-*grab_mapping_entry()willmakesurewegeta2Memptyentry,aDAX-*PMDoraHZPentry.Ifitcan't(becausea4kpageisalreadyin-*thetree,forinstance),itwillreturn-EEXISTandwejustfall-*backto4kentries.-*/-entry=grab_mapping_entry(mapping,pgoff,RADIX_DAX_PMD);-if(IS_ERR(entry))-gotofallback;--/**Notethatwedon'tuseiomap_applyhere.Wearen'tdoingI/O,only*settingupamapping,soreallywe'reusingiomap_begin()asaway*tolookupourfilesystemblock.
@@ -1349,10 +1346,21 @@ int dax_iomap_pmd_fault(struct vm_area_struct *vma, unsigned long address,pos=(loff_t)pgoff<<PAGE_SHIFT;error=ops->iomap_begin(inode,pos,PMD_SIZE,iomap_flags,&iomap);if(error)-gotounlock_entry;+gotofallback;+if(iomap.offset+iomap.length<pos+PMD_SIZE)gotofinish_iomap;+/*+*grab_mapping_entry()willmakesurewegeta2Memptyentry,aDAX+*PMDoraHZPentry.Ifitcan't(becausea4kpageisalreadyin+*thetree,forinstance),itwillreturn-EEXISTandwejustfall+*backto4kentries.+*/+entry=grab_mapping_entry(mapping,pgoff,RADIX_DAX_PMD);+if(IS_ERR(entry))+gotofinish_iomap;+vmf.pgoff=pgoff;vmf.flags=flags;vmf.gfp_mask=mapping_gfp_mask(mapping)|__GFP_IO;
@@ -1365,7 +1373,7 @@ int dax_iomap_pmd_fault(struct vm_area_struct *vma, unsigned long address,caseIOMAP_UNWRITTEN:caseIOMAP_HOLE:if(WARN_ON_ONCE(write))-gotofinish_iomap;+gotounlock_entry;result=dax_pmd_load_hole(vma,pmd,&vmf,address,&iomap,&entry);break;
@@ -1374,20 +1382,23 @@ int dax_iomap_pmd_fault(struct vm_area_struct *vma, unsigned long address,break;}+unlock_entry:+put_locked_mapping_entry(mapping,pgoff,entry);finish_iomap:if(ops->iomap_end){-if(result==VM_FAULT_FALLBACK){-ops->iomap_end(inode,pos,PMD_SIZE,0,iomap_flags,-&iomap);-}else{-error=ops->iomap_end(inode,pos,PMD_SIZE,PMD_SIZE,-iomap_flags,&iomap);-if(error)-result=VM_FAULT_FALLBACK;-}+intcopied=PMD_SIZE;++if(result==VM_FAULT_FALLBACK)+copied=0;+/*+*Thefaultisdonebynowandthere'snowayback(other+*threadmaybealreadyhappilyusingPMDwehaveinstalled).+*Justignoreerrorfrom->iomap_endsincewecannotdomuch+*withit.+*/+ops->iomap_end(inode,pos,PMD_SIZE,copied,iomap_flags,+&iomap);}-unlock_entry:-put_locked_mapping_entry(mapping,pgoff,entry);fallback:if(result==VM_FAULT_FALLBACK){split_huge_pmd(vma,pmd,address);
--
2.10.2
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-12 16:47:08
Now that dax_iomap_fault() calls ->iomap_begin() without entry lock, we
can use transaction starting in ext4_iomap_begin() and thus simplify
ext4_dax_fault(). It also provides us proper retries in case of ENOSPC.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ext4/file.c | 48 ++++++++++--------------------------------------
1 file changed, 10 insertions(+), 38 deletions(-)
@@ -292,7 +279,6 @@ static int ext4_dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,pmd_t*pmd,unsignedintflags){intresult;-handle_t*handle=NULL;structinode*inode=file_inode(vma->vm_file);structsuper_block*sb=inode->i_sb;boolwrite=flags&FAULT_FLAG_WRITE;
@@ -300,27 +286,13 @@ static int ext4_dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,if(write){sb_start_pagefault(sb);file_update_time(vma->vm_file);-down_read(&EXT4_I(inode)->i_mmap_sem);-handle=ext4_journal_start_sb(sb,EXT4_HT_WRITE_PAGE,-ext4_chunk_trans_blocks(inode,-PMD_SIZE/PAGE_SIZE));-}else-down_read(&EXT4_I(inode)->i_mmap_sem);--if(IS_ERR(handle))-result=VM_FAULT_SIGBUS;-else{-result=dax_iomap_pmd_fault(vma,addr,pmd,flags,-&ext4_iomap_ops);}--if(write){-if(!IS_ERR(handle))-ext4_journal_stop(handle);-up_read(&EXT4_I(inode)->i_mmap_sem);+down_read(&EXT4_I(inode)->i_mmap_sem);+result=dax_iomap_pmd_fault(vma,addr,pmd,flags,+&ext4_iomap_ops);+up_read(&EXT4_I(inode)->i_mmap_sem);+if(write)sb_end_pagefault(sb);-}else-up_read(&EXT4_I(inode)->i_mmap_sem);returnresult;}
--
2.10.2
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Johannes Weiner <hannes@cmpxchg.org> Date: 2016-12-12 17:50:55
On Mon, Dec 12, 2016 at 05:47:04PM +0100, Jan Kara wrote:
Currently invalidate_inode_pages2_range() and invalidate_mapping_pages()
just delete all exceptional radix tree entries they find. For DAX this
is not desirable as we track cache dirtiness in these entries and when
they are evicted, we may not flush caches although it is necessary. This
can for example manifest when we write to the same block both via mmap
and via write(2) (to different offsets) and fsync(2) then does not
properly flush CPU caches when modification via write(2) was the last
one.
Create appropriate DAX functions to handle invalidation of DAX entries
for invalidate_inode_pages2_range() and invalidate_mapping_pages() and
wire them up into the corresponding mm functions.
Reviewed-by: Ross Zwisler <redacted>
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Johannes Weiner <hannes@cmpxchg.org> Date: 2016-12-12 17:51:33
On Mon, Dec 12, 2016 at 05:47:02PM +0100, Jan Kara wrote:
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
LGTM, thanks Jan
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-13 11:52:09
On Mon 12-12-16 17:47:02, Jan Kara wrote:
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
Dan?
Honza
Changes since v2:
* Added Reviewed-by tags
* Fixed commit message of patch 3
* Slightly simplified dax_iomap_pmd_fault()
* Renamed truncation functions to express better what they do
Changes since v1:
* Rebased on top of patches in mm tree
* Added some Reviewed-by tags
* renamed some functions based on review feedback
Honza
--
Jan Kara [off-list ref]
SUSE Labs, CR
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Dan Williams <hidden> Date: 2016-12-13 18:57:23
On Tue, Dec 13, 2016 at 3:52 AM, Jan Kara [off-list ref] wrote:
On Mon 12-12-16 17:47:02, Jan Kara wrote:
quoted
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
Dan?
I like the -rc2 plan better than sending a pull request based on some
random point in the middle of the merge window. I can give Linus a
heads up in my initial nvdimm pull request for -rc1 that for
coordination purposes we'll be sending this set of follow-on DAX
cleanups for -rc2.
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Dave Chinner <david@fromorbit.com> Date: 2016-12-13 20:01:57
On Tue, Dec 13, 2016 at 12:52:09PM +0100, Jan Kara wrote:
On Mon 12-12-16 17:47:02, Jan Kara wrote:
quoted
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
And I'm waiting on Jens and the block tree before I send Linus
a pulllreq for all the stuff I have queued because of the conflicts
in the iomap-direct IO patches I've also got in the XFS tree... :/
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
On Tue, Dec 13, 2016 at 12:52:09PM +0100, Jan Kara wrote:
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
Dan?
I've sent out the pull request for ext4.... which includes the
dax-4.0-iomap-pmd and fscrypt branch. Yes, convoluted. :-)
- Ted
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Dan Williams <hidden> Date: 2016-12-17 01:35:35
On Tue, Dec 13, 2016 at 10:57 AM, Dan Williams [off-list ref] wrote:
On Tue, Dec 13, 2016 at 3:52 AM, Jan Kara [off-list ref] wrote:
quoted
On Mon 12-12-16 17:47:02, Jan Kara wrote:
quoted
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
Dan?
I like the -rc2 plan better than sending a pull request based on some
random point in the middle of the merge window. I can give Linus a
heads up in my initial nvdimm pull request for -rc1 that for
coordination purposes we'll be sending this set of follow-on DAX
cleanups for -rc2.
So what's still pending for -rc2? I want to be explicit about what I'm
requesting Linus be prepared to receive after -rc1. The libnvdimm pull
request is very light this time around since I ended up deferring the
device-dax-subdivision topic until 4.11 and sub-section memory hotplug
didn't make the cutoff for -mm. We can spend some of that goodwill on
your patches ;-).
I can roll them into libnvdimm-for-next now for the integration
testing coverage, rebase to -rc1 when it's out, wait for your thumbs
up on the testing and send a pull request on the 23rd.
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Dan Williams <hidden> Date: 2016-12-17 01:49:47
On Fri, Dec 16, 2016 at 5:35 PM, Dan Williams [off-list ref] wrote:
On Tue, Dec 13, 2016 at 10:57 AM, Dan Williams [off-list ref] wrote:
quoted
On Tue, Dec 13, 2016 at 3:52 AM, Jan Kara [off-list ref] wrote:
quoted
On Mon 12-12-16 17:47:02, Jan Kara wrote:
quoted
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
Dan?
I like the -rc2 plan better than sending a pull request based on some
random point in the middle of the merge window. I can give Linus a
heads up in my initial nvdimm pull request for -rc1 that for
coordination purposes we'll be sending this set of follow-on DAX
cleanups for -rc2.
So what's still pending for -rc2? I want to be explicit about what I'm
requesting Linus be prepared to receive after -rc1. The libnvdimm pull
request is very light this time around since I ended up deferring the
device-dax-subdivision topic until 4.11 and sub-section memory hotplug
didn't make the cutoff for -mm. We can spend some of that goodwill on
your patches ;-).
I can roll them into libnvdimm-for-next now for the integration
testing coverage, rebase to -rc1 when it's out, wait for your thumbs
up on the testing and send a pull request on the 23rd.
Sorry, I meant the 30th of December.
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-19 09:56:23
On Fri 16-12-16 17:35:35, Dan Williams wrote:
On Tue, Dec 13, 2016 at 10:57 AM, Dan Williams [off-list ref] wrote:
quoted
On Tue, Dec 13, 2016 at 3:52 AM, Jan Kara [off-list ref] wrote:
quoted
On Mon 12-12-16 17:47:02, Jan Kara wrote:
quoted
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
Dan?
I like the -rc2 plan better than sending a pull request based on some
random point in the middle of the merge window. I can give Linus a
heads up in my initial nvdimm pull request for -rc1 that for
coordination purposes we'll be sending this set of follow-on DAX
cleanups for -rc2.
So what's still pending for -rc2? I want to be explicit about what I'm
requesting Linus be prepared to receive after -rc1. The libnvdimm pull
request is very light this time around since I ended up deferring the
device-dax-subdivision topic until 4.11 and sub-section memory hotplug
didn't make the cutoff for -mm. We can spend some of that goodwill on
your patches ;-).
;-) So I'd like all these 6 patches to go for rc2. The first three patches
fix invalidation of exceptional DAX entries (a bug which is there for a
long time) - without these patches data loss can occur on power failure
even though user called fsync(2). The other three patches change locking of
DAX faults so that ->iomap_begin() is called in a more relaxed locking
context and we are safe to start a transaction there for ext4.
I can roll them into libnvdimm-for-next now for the integration
testing coverage, rebase to -rc1 when it's out, wait for your thumbs
up on the testing and send a pull request on the 23rd.
Yup, all prerequisites are merged now so you can pick these patches up.
Thanks! Note that I'll be on vacation on Dec 23 - Jan 1.
Honza
--
Jan Kara [off-list ref]
SUSE Labs, CR
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Dan Williams <hidden> Date: 2016-12-19 21:51:53
On Mon, Dec 19, 2016 at 1:56 AM, Jan Kara [off-list ref] wrote:
On Fri 16-12-16 17:35:35, Dan Williams wrote:
quoted
On Tue, Dec 13, 2016 at 10:57 AM, Dan Williams [off-list ref] wrote:
quoted
On Tue, Dec 13, 2016 at 3:52 AM, Jan Kara [off-list ref] wrote:
quoted
On Mon 12-12-16 17:47:02, Jan Kara wrote:
quoted
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
Dan?
I like the -rc2 plan better than sending a pull request based on some
random point in the middle of the merge window. I can give Linus a
heads up in my initial nvdimm pull request for -rc1 that for
coordination purposes we'll be sending this set of follow-on DAX
cleanups for -rc2.
So what's still pending for -rc2? I want to be explicit about what I'm
requesting Linus be prepared to receive after -rc1. The libnvdimm pull
request is very light this time around since I ended up deferring the
device-dax-subdivision topic until 4.11 and sub-section memory hotplug
didn't make the cutoff for -mm. We can spend some of that goodwill on
your patches ;-).
;-) So I'd like all these 6 patches to go for rc2. The first three patches
fix invalidation of exceptional DAX entries (a bug which is there for a
long time) - without these patches data loss can occur on power failure
even though user called fsync(2). The other three patches change locking of
DAX faults so that ->iomap_begin() is called in a more relaxed locking
context and we are safe to start a transaction there for ext4.
quoted
I can roll them into libnvdimm-for-next now for the integration
testing coverage, rebase to -rc1 when it's out, wait for your thumbs
up on the testing and send a pull request on the 23rd.
Yup, all prerequisites are merged now so you can pick these patches up.
Thanks! Note that I'll be on vacation on Dec 23 - Jan 1.
Sounds good, the contents are now out on libnvdimm-pending awaiting
0day-run before moving them over to libnvdimm-for-next, also it's down
to 5 patches since it seems that the "dax: Fix sleep in atomic contex
in grab_mapping_entry()" change went upstream already.
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Jan Kara <jack@suse.cz> Date: 2016-12-20 07:59:42
On Mon 19-12-16 13:51:53, Dan Williams wrote:
On Mon, Dec 19, 2016 at 1:56 AM, Jan Kara [off-list ref] wrote:
quoted
On Fri 16-12-16 17:35:35, Dan Williams wrote:
quoted
On Tue, Dec 13, 2016 at 10:57 AM, Dan Williams [off-list ref] wrote:
quoted
On Tue, Dec 13, 2016 at 3:52 AM, Jan Kara [off-list ref] wrote:
quoted
On Mon 12-12-16 17:47:02, Jan Kara wrote:
quoted
Hello,
this is the third revision of my fixes of races when invalidating hole pages in
DAX mappings. See changelogs for details. The series is based on my patches to
write-protect DAX PTEs which are currently carried in mm tree. This is a hard
dependency because we really need to closely track dirtiness (and cleanness!)
of radix tree entries in DAX mappings in order to avoid discarding valid dirty
bits leading to missed cache flushes on fsync(2).
The tests have passed xfstests for xfs and ext4 in DAX and non-DAX mode.
Johannes, are you OK with patch 2/6 in its current form? I'd like to push these
patches to some tree once DAX write-protection patches are merged. I'm hoping
to get at least first three patches merged for 4.10-rc2... Thanks!
OK, with the final ack from Johannes and since this is mostly DAX stuff,
can we take this through NVDIMM tree and push to Linus either late in the
merge window or for -rc2? These patches require my DAX patches sitting in mm
tree so they can be included in any git tree only once those patches land
in Linus' tree (which may happen only once Dave and Ted push out their
stuff - this is the most convoluted merge window I'd ever to deal with ;-)...
Dan?
I like the -rc2 plan better than sending a pull request based on some
random point in the middle of the merge window. I can give Linus a
heads up in my initial nvdimm pull request for -rc1 that for
coordination purposes we'll be sending this set of follow-on DAX
cleanups for -rc2.
So what's still pending for -rc2? I want to be explicit about what I'm
requesting Linus be prepared to receive after -rc1. The libnvdimm pull
request is very light this time around since I ended up deferring the
device-dax-subdivision topic until 4.11 and sub-section memory hotplug
didn't make the cutoff for -mm. We can spend some of that goodwill on
your patches ;-).
;-) So I'd like all these 6 patches to go for rc2. The first three patches
fix invalidation of exceptional DAX entries (a bug which is there for a
long time) - without these patches data loss can occur on power failure
even though user called fsync(2). The other three patches change locking of
DAX faults so that ->iomap_begin() is called in a more relaxed locking
context and we are safe to start a transaction there for ext4.
quoted
I can roll them into libnvdimm-for-next now for the integration
testing coverage, rebase to -rc1 when it's out, wait for your thumbs
up on the testing and send a pull request on the 23rd.
Yup, all prerequisites are merged now so you can pick these patches up.
Thanks! Note that I'll be on vacation on Dec 23 - Jan 1.
Sounds good, the contents are now out on libnvdimm-pending awaiting
0day-run before moving them over to libnvdimm-for-next, also it's down
to 5 patches since it seems that the "dax: Fix sleep in atomic contex
in grab_mapping_entry()" change went upstream already.
Yes, but I've accounted for that. Checking the libnvdimm-pending branch I
see you missed "ext2: Return BH_New buffers for zeroed blocks" which was
the first patch in the series. The subject is a slight misnomer since it is
about setting IOMAP_F_NEW flag instead these days but still it is needed...
Otherwise the DAX invalidation code would not propely invalidate zero pages
in the radix tree in response to writes for ext2.
Honza
--
Jan Kara [off-list ref]
SUSE Labs, CR
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
From: Dan Williams <hidden> Date: 2016-12-20 20:09:45
On Mon, Dec 19, 2016 at 11:59 PM, Jan Kara [off-list ref] wrote:
On Mon 19-12-16 13:51:53, Dan Williams wrote:
[..]
Yes, but I've accounted for that. Checking the libnvdimm-pending branch I
see you missed "ext2: Return BH_New buffers for zeroed blocks" which was
the first patch in the series. The subject is a slight misnomer since it is
about setting IOMAP_F_NEW flag instead these days but still it is needed...
Otherwise the DAX invalidation code would not propely invalidate zero pages
in the radix tree in response to writes for ext2.
Ok, thanks. Updated libnvdimm-pending pushed out.
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>