Hi Muchun, > Thank you very much for the test, so in your scenario, this is also > the behavior of your real workload (mainly read/write-based, rather > than mmap), right?
Yes. We mount read-only rootfs images over virtio-pmem and FS-DAX. Most file access goes through normal read/write. mmap is only used for loading binaries and shared libraries at startup, which is a small part of the image. > To be fair, it does fix the issue, but it's not very clean. I might > do some code cleanup first to solve this more gracefully. I want to > move the initialization to where the template page is allocated, > similar to what section-based vmemmap optimization does. Makes sense. Initializing it at allocation time is cleaner. > Thanks for the analysis and suggestions. However, the reason I > haven't sent out v2 yet is that I've been trying to refactor the > vmemmap optimization logic to make FS_DAX support cleaner. I think > I'll probably do some code refactoring first. Understood. It would also help if the refactor could support subsection (2 MiB) alignment, so any 2 MiB-aligned device can use the optimization without padding to a 128 MiB multiple. > I'cc you next time if you'd like to help me test. Sounds good. Please Cc me when you post v2 and I'll be glad to test. Best regards, Yilei
