All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bugfix dax fault page should be no cache
@ 2016-01-12 11:43 chenjie6
  2016-01-12 12:51 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: chenjie6 @ 2016-01-12 11:43 UTC (permalink / raw)
  To: Alexander Viro, Matthew Wilcox, linux-fsdevel, zhihui.gao
  Cc: linux-kernel, lizefan, chenjie, stable

From: chenjie <chenjie6@huawei.com>

We show the pte: 
	*pte=01600000159c8fd3
The page should be no_cache attr,it will be better. 

Cc: <stable@vger.kernel.org>
Signed-off-by: chenjie <chenjie6@huawei.com>
---
 fs/dax.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/dax.c b/fs/dax.c
index 43671b6..179ced6 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -328,6 +328,8 @@ static int dax_insert_mapping(struct inode *inode, struct buffer_head *bh,
 		wmb_pmem();
 	}
 
+	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+
 	error = vm_insert_mixed(vma, vaddr, pfn);
 
  out:
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] bugfix dax fault page should be no cache
  2016-01-12 11:43 [PATCH] bugfix dax fault page should be no cache chenjie6
@ 2016-01-12 12:51 ` Matthew Wilcox
  2016-01-13  3:47   ` Chenjie (K)
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2016-01-12 12:51 UTC (permalink / raw)
  To: chenjie6
  Cc: Alexander Viro, linux-fsdevel, zhihui.gao, linux-kernel, lizefan, stable

On Tue, Jan 12, 2016 at 07:43:45PM +0800, chenjie6@huawei.com wrote:
> From: chenjie <chenjie6@huawei.com>
> 
> We show the pte: 
> 	*pte=01600000159c8fd3
> The page should be no_cache attr,it will be better. 

I disagree.  What data do you have to show that the WC attribute would
be better than WB?

Even if we agree to that, this is the wrong place to change that
attribute, so the patch is NAKed.  But you need more than "it will
be better".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bugfix dax fault page should be no cache
  2016-01-12 12:51 ` Matthew Wilcox
@ 2016-01-13  3:47   ` Chenjie (K)
  2016-01-13 16:32     ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Chenjie (K) @ 2016-01-13  3:47 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Alexander Viro, linux-fsdevel, zhihui.gao, linux-kernel, lizefan, stable


The DAX means Direct Access for files,if the pages have cache,
the file is not direct access. But in normal condition,
we can not find the problem directly.

  In our case, we use ext2 filesystem with dax on the reserved mem.
we mmap the file and write some things ,the file is not changed immediately.

this is the wrong place to change that attribute:
	Do you mean
add
	ext4_file_mmap/ext2_file_mmap

	if (IS_DAX(file_inode(file))) {
		vma->vm_ops = &ext4_dax_vm_ops;
		vma->vm_flags |= VM_MIXEDMAP;
+	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
	} else {
like this ???

On 2016/1/12 20:51, Matthew Wilcox wrote:
> On Tue, Jan 12, 2016 at 07:43:45PM +0800, chenjie6@huawei.com wrote:
>> From: chenjie <chenjie6@huawei.com>
>>
>> We show the pte:
>> 	*pte=01600000159c8fd3
>> The page should be no_cache attr,it will be better.
>
> I disagree.  What data do you have to show that the WC attribute would
> be better than WB?
>
> Even if we agree to that, this is the wrong place to change that
> attribute, so the patch is NAKed.  But you need more than "it will
> be better".
>
> .
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bugfix dax fault page should be no cache
  2016-01-13  3:47   ` Chenjie (K)
@ 2016-01-13 16:32     ` Matthew Wilcox
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2016-01-13 16:32 UTC (permalink / raw)
  To: Chenjie (K)
  Cc: Alexander Viro, linux-fsdevel, zhihui.gao, linux-kernel, lizefan, stable

On Wed, Jan 13, 2016 at 11:47:12AM +0800, Chenjie (K) wrote:
> The DAX means Direct Access for files,if the pages have cache,
> the file is not direct access. But in normal condition,
> we can not find the problem directly.

The file absolutely is direct accessed.  The CPU cache is critical to
performance, and should not be bypassed lightly.  We have instructions to
flush the cache, and a library (see http://pmem.io/) so that applications
don't have to use them directly.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-13 16:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-12 11:43 [PATCH] bugfix dax fault page should be no cache chenjie6
2016-01-12 12:51 ` Matthew Wilcox
2016-01-13  3:47   ` Chenjie (K)
2016-01-13 16:32     ` Matthew Wilcox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.