Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1662729 > unrolled thread

[PATCH v3 06/14] filesystem-dax: convert to dax_flush()

Started byDan Williams <dan.j.williams@intel.com>
First post2017-06-09 22:40 +0200
Last post2017-06-14 13:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 06/14] filesystem-dax: convert to dax_flush() Dan Williams <dan.j.williams@intel.com> - 2017-06-09 22:40 +0200
    Re: [PATCH v3 06/14] filesystem-dax: convert to dax_flush() Jan Kara <jack@suse.cz> - 2017-06-14 13:00 +0200

#1662729 — [PATCH v3 06/14] filesystem-dax: convert to dax_flush()

FromDan Williams <dan.j.williams@intel.com>
Date2017-06-09 22:40 +0200
Subject[PATCH v3 06/14] filesystem-dax: convert to dax_flush()
Message-ID<tQyRk-6b1-23@gated-at.bofh.it>
Filesystem-DAX flushes caches whenever it writes to the address returned
through dax_direct_access() and when writing back dirty radix entries.
That flushing is only required in the pmem case, so the dax_flush()
helper skips cache management work when the underlying driver does not
specify a flush method.

We still do all the dirty tracking since the radix entry will already be
there for locking purposes. However, the work to clean the entry will be
a nop for some dax drivers.

Cc: Jan Kara <jack@suse.cz>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 fs/dax.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dax.c b/fs/dax.c
index b459948de427..0933fc460ada 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -784,7 +784,7 @@ static int dax_writeback_one(struct block_device *bdev,
 	}
 
 	dax_mapping_entry_mkclean(mapping, index, pfn_t_to_pfn(pfn));
-	wb_cache_pmem(kaddr, size);
+	dax_flush(dax_dev, pgoff, kaddr, size);
 	/*
 	 * After we have flushed the cache, we can clear the dirty tag. There
 	 * cannot be new dirty data in the pfn after the flush has completed as

[toc] | [next] | [standalone]


#1665702

FromJan Kara <jack@suse.cz>
Date2017-06-14 13:00 +0200
Message-ID<tSebL-48n-9@gated-at.bofh.it>
In reply to#1662729
On Fri 09-06-17 13:24:18, Dan Williams wrote:
> Filesystem-DAX flushes caches whenever it writes to the address returned
> through dax_direct_access() and when writing back dirty radix entries.
> That flushing is only required in the pmem case, so the dax_flush()
> helper skips cache management work when the underlying driver does not
> specify a flush method.
> 
> We still do all the dirty tracking since the radix entry will already be
> there for locking purposes. However, the work to clean the entry will be
> a nop for some dax drivers.
> 
> Cc: Jan Kara <jack@suse.cz>
> Cc: Jeff Moyer <jmoyer@redhat.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Matthew Wilcox <mawilcox@microsoft.com>
> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Looks good to me. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/dax.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/dax.c b/fs/dax.c
> index b459948de427..0933fc460ada 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -784,7 +784,7 @@ static int dax_writeback_one(struct block_device *bdev,
>  	}
>  
>  	dax_mapping_entry_mkclean(mapping, index, pfn_t_to_pfn(pfn));
> -	wb_cache_pmem(kaddr, size);
> +	dax_flush(dax_dev, pgoff, kaddr, size);
>  	/*
>  	 * After we have flushed the cache, we can clear the dirty tag. There
>  	 * cannot be new dirty data in the pfn after the flush has completed as
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web