On Wed 02-11-16 07:30:06, Christoph Hellwig wrote:
> On Tue, Nov 01, 2016 at 10:06:18PM +0100, Jan Kara wrote:
> > Convert DAX faults to use iomap infrastructure. We would not have to start
> > transaction in ext4_dax_fault() anymore since ext4_iomap_begin takes
> > care of that but so far we do th
On Wed 02-11-16 07:27:46, Christoph Hellwig wrote:
> On Tue, Nov 01, 2016 at 10:06:12PM +0100, Jan Kara wrote:
> > Currently we don't allow unaligned writes without inode_lock. This is
> > because zeroing of partial blocks could cause data corruption for racing
> > unaligned writes to the same bloc
On Wed 02-11-16 09:03:53, Ted Tso wrote:
> On Wed, Nov 02, 2016 at 12:09:03AM +0100, Jan Kara wrote:
> > > > I plan to grab Ross's PMD series in the next couple of days and I'll
> > > > push it out as a stable topic branch once I've sanity tested it. I
> > > > don't really want to take a big chunk
On Tue 01-11-16 23:17:33, Ross Zwisler wrote:
> On Tue, Nov 01, 2016 at 11:36:06PM +0100, Jan Kara wrote:
> > Hello,
> >
> > this is the fourth revision of my patches to clear dirty bits from radix
> > tree
> > of DAX inodes when caches for corresponding pfns have been flushed. This
> > patch
>
On Wed 02-11-16 07:31:00, Christoph Hellwig wrote:
> On Tue, Nov 01, 2016 at 10:06:21PM +0100, Jan Kara wrote:
> > No one uses functions using the get_block callback anymore. Rip them
> > out.
>
> Documentation/filesystems/dax.txt will also need some updates for this.
Right, will do.
On Wed 02-11-16 12:58:48, Kirill A. Shutemov wrote:
> On Tue, Nov 01, 2016 at 11:36:08PM +0100, Jan Kara wrote:
> > Currently we have two different structures for passing fault information
> > around - struct vm_fault and struct fault_env. DAX will need more
> > information in struct vm_fault to ha
Add orig_pte field to vm_fault structure to allow ->page_mkwrite
handlers to fully handle the fault. This also allows us to save some
passing of extra arguments around.
Signed-off-by: Jan Kara
---
include/linux/mm.h | 4 +--
mm/internal.h | 2 +-
mm/khugepaged.c| 7 ++---
mm/memory.c
Currently finish_mkwrite_fault() returns 0 when PTE got changed before
we acquired PTE lock and VM_FAULT_WRITE when we succeeded in modifying
the PTE. This is somewhat confusing since 0 generally means success, it
is also inconsistent with finish_fault() which returns 0 on success.
Change finish_mk
Move final handling of COW faults from generic code into DAX fault
handler. That way generic code doesn't have to be aware of peculiarities
of DAX locking so remove that knowledge and make locking functions
private to fs/dax.c.
Signed-off-by: Jan Kara
---
fs/dax.c| 58 +++
Use vm_fault structure to pass cow_page, page, and entry in and out of
the function. That reduces number of __do_fault() arguments from 4 to 1.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
mm/memory.c | 53 +++--
1 file changed, 23 insert
Provide a helper function for finishing write faults due to PTE being
read-only. The helper will be used by DAX to avoid the need of
complicating generic MM code with DAX locking specifics.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
include/linux/mm.h | 1 +
mm/memory.c| 67
Hello,
I'm resending v4 of my DAX write-protection patches since I've messed up
previous posting, mixing old and new version of the patch series...
This is the fourth revision of my patches to clear dirty bits from radix tree
of DAX inodes when caches for corresponding pfns have been flushed. Thi
Every single user of vmf->virtual_address typed that entry to unsigned
long before doing anything with it so the type of virtual_address does
not really provide us any additional safety. Just use masked
vmf->address which already has the appropriate type.
Signed-off-by: Jan Kara
---
arch/powerpc
We will need more information in the ->page_mkwrite() helper for DAX to
be able to fully finish faults there. Pass vm_fault structure to
do_page_mkwrite() and use it there so that information propagates
properly from upper layers.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
mm/memory.
struct vm_fault has already pgoff entry. Use it instead of passing pgoff
as a separate argument and then assigning it later.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
mm/khugepaged.c | 1 +
mm/memory.c | 35 ++-
2 files changed, 19 insertions(+),
Instead of creating another vm_fault structure, use the one passed to
__do_fault() for passing arguments into fault handler.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
mm/memory.c | 25 ++---
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/mm/memor
Currently we duplicate handling of shared write faults in
wp_page_reuse() and do_shared_fault(). Factor them out into a common
function.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
mm/memory.c | 78 +
1 file changed, 37 inser
Currently we have two different structures for passing fault information
around - struct vm_fault and struct fault_env. DAX will need more
information in struct vm_fault to handle its faults so the content of
that structure would become event closer to fault_env. Furthermore it
would need to genera
Currently, flushing of caches for DAX mappings was ignoring entry lock.
So far this was ok (modulo a bug that a difference in entry lock could
cause cache flushing to be mistakenly skipped) but in the following
patches we will write-protect PTEs on cache flushing and clear dirty
tags. For that we w
Currently PTE gets updated in wp_pfn_shared() after dax_pfn_mkwrite()
has released corresponding radix tree entry lock. When we want to
writeprotect PTE on cache flush, we need PTE modification to happen
under radix tree entry lock to ensure consistent updates of PTE and radix
tree (standard faults
DAX will need to implement its own version of page_check_address(). To
avoid duplicating page table walking code, export follow_pte() which
does what we need.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
include/linux/mm.h | 2 ++
mm/memory.c| 4 ++--
2 files changed, 4 inserti
So far we set vmf->page during WP faults only when we needed to pass it
to the ->page_mkwrite handler. Set it in all the cases now and use that
instead of passing page pointer explicitly around.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
mm/memory.c | 58 +
To allow full handling of COW faults add memcg field to struct vm_fault
and a return value of ->fault() handler meaning that COW fault is fully
handled and memcg charge must not be canceled. This will allow us to
remove knowledge about special DAX locking from the generic fault code.
Reviewed-by:
Introduce function finish_fault() as a helper function for finishing
page faults. It is rather thin wrapper around alloc_set_pte() but since
we'd want to call this from DAX code or filesystems, it is still useful
to avoid some boilerplate code.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
-
Instead of creating another vm_fault structure, use the one passed to
wp_pfn_shared() for passing arguments into pfn_mkwrite handler.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan Kara
---
mm/memory.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/mm/memory.c b/mm/m
We don't check whether vma->vm_ops is NULL in do_shared_fault() so
there's hardly any point in checking it in wp_page_shared() or
wp_pfn_shared() which get called only for shared file mappings as well.
Signed-off-by: Jan Kara
---
mm/memory.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
Currently we never clear dirty tags in DAX mappings and thus address
ranges to flush accumulate. Now that we have locking of radix tree
entries, we have all the locking necessary to reliably clear the radix
tree dirty tag when flushing caches for corresponding address range.
Similarly to page_mkcle
wp_page_reuse() handles write shared faults which is needed only in
wp_page_shared(). Move the handling only into that location to make
wp_page_reuse() simpler and avoid a strange situation when we sometimes
pass in locked page, sometimes unlocked etc.
Reviewed-by: Ross Zwisler
Signed-off-by: Jan
On Thu 03-11-16 15:04:40, Ross Zwisler wrote:
> On Tue, Nov 01, 2016 at 10:06:11PM +0100, Jan Kara wrote:
> > + /*
> > +* 'err==len' means that all of blocks has been preallocated no matter
> > +* they are initialized or not. For excluding unwritten extents, we
> > +* need to check m
On Wed 02-11-16 12:18:10, Hillf Danton wrote:
> On Wednesday, November 02, 2016 6:36 AM Jan Kara wrote:
> > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > index 8e8b76d11bb4..2a4ebe3c67c6 100644
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -297,8 +297,6 @@ struct vm_fa
On Thu, Nov 03, 2016 at 11:51:02AM -0600, Ross Zwisler wrote:
> On Thu, Nov 03, 2016 at 12:58:26PM +1100, Dave Chinner wrote:
> > On Tue, Nov 01, 2016 at 01:54:02PM -0600, Ross Zwisler wrote:
> > > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based
> > > locking. This serie
On Tue, Nov 01, 2016 at 10:06:11PM +0100, Jan Kara wrote:
> Factor out checks of 'from' and whether we are overwriting out of
> ext4_file_write_iter() so that the function is easier to follow.
>
> Signed-off-by: Jan Kara
> ---
> fs/ext4/file.c | 97
> ++--
On Wed 02-11-16 13:02:17, Kirill A. Shutemov wrote:
> On Wed, Nov 02, 2016 at 12:13:18AM +0100, Jan Kara wrote:
> > Hi,
> >
> > forgot to add Kirill to CC since this modifies the fault path he changed
> > recently. I don't want to resend the whole series just because of this so
> > at least I'm pi
On Thu, Nov 03, 2016 at 12:58:26PM +1100, Dave Chinner wrote:
> On Tue, Nov 01, 2016 at 01:54:02PM -0600, Ross Zwisler wrote:
> > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based
> > locking. This series allows DAX PMDs to participate in the DAX radix tree
> > based locki
34 matches
Mail list logo