* [HELP] mmap fsdax mode pmem to userland with writethrough
@ 2020-12-14 10:44 Wang Jianchao
2020-12-15 8:34 ` Wang Jianchao
0 siblings, 1 reply; 2+ messages in thread
From: Wang Jianchao @ 2020-12-14 10:44 UTC (permalink / raw)
To: linux-nvdimm
Hi list
We are trying to mmap the file in xfs-dax to userland with writethrough mode,
hope to avoid bandwidth and latency cause by write-allocate in writeback mode
and we can still use the original userland application code w/o using NTstore.
We add following code in the mmap callback of xfs,
vma->vm_page_prot = pgprot_writethrough(vma->vm_page_prot);
But it seems to not work. When I use pcm-memory to check the bandwidth of PMM,
PMM read BW is still there which is nearly equal with PMM write. Even I use
pgprot_noncached, it still not work.
What should I do to implement the writethrough mapping ?
Thanks a million for any help.
Jianchao
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [HELP] mmap fsdax mode pmem to userland with writethrough
2020-12-14 10:44 [HELP] mmap fsdax mode pmem to userland with writethrough Wang Jianchao
@ 2020-12-15 8:34 ` Wang Jianchao
0 siblings, 0 replies; 2+ messages in thread
From: Wang Jianchao @ 2020-12-15 8:34 UTC (permalink / raw)
To: linux-nvdimm
It was figured out that the track_pfn_insert changed the pgprot.
I tried two ways to workaround it
(1) change the pte in the fault callback directly
(2) add a helper interface of devm_memremap_pages that has a pgprot.
The writethrough mmap seems to success but the final performance is
really bad, just 20M/s per thread....
On 2020/12/14 6:44 下午, Wang Jianchao wrote:
> Hi list
>
> We are trying to mmap the file in xfs-dax to userland with writethrough mode,
> hope to avoid bandwidth and latency cause by write-allocate in writeback mode
> and we can still use the original userland application code w/o using NTstore.
>
> We add following code in the mmap callback of xfs,
>
> vma->vm_page_prot = pgprot_writethrough(vma->vm_page_prot);
>
> But it seems to not work. When I use pcm-memory to check the bandwidth of PMM,
> PMM read BW is still there which is nearly equal with PMM write. Even I use
> pgprot_noncached, it still not work.
>
> What should I do to implement the writethrough mapping ?
>
> Thanks a million for any help.
>
> Jianchao
>
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-15 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 10:44 [HELP] mmap fsdax mode pmem to userland with writethrough Wang Jianchao
2020-12-15 8:34 ` Wang Jianchao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).