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 -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to