Bring back DAX
Re-add the shmem region required for DAX again (after it got removed when virtio-gpu was implemented), and enable DAX.
Hey @asahilina, what's the best way to test that DAX is working again?
The kernel will try to use it unconditionally if the mount flag is present (that's how I figured out what was missing, enabling DAX just broke everything until I got it right).
I haven't truly tested it end to end though, but I'll find out soon enough if it's working as advertised since a use case I'm interested in relies on coherent /dev/shm memory mappings between the host and the guest. ^^
On July 8, 2024 2:10:41 AM GMT+09:00, David Gageot @.***> wrote:
Hey @asahilina, what's the best way to test that DAX is working again?
-- Reply to this email directly or view it on GitHub: https://github.com/containers/libkrun/pull/205#issuecomment-2212512055 You are receiving this because you were mentioned.
Message ID: @.***>
The kernel will try to use it unconditionally if the mount flag is present (that's how I figured out what was missing, enabling DAX just broke everything until I got it right). I haven't truly tested it end to end though, but I'll find out soon enough if it's working as advertised since a use case I'm interested in relies on coherent /dev/shm memory mappings between the host and the guest. ^^ …
Thanks a lot! If I understand correctly, your use case is using DAX on the boot "disk" that's over virtiofs. I'm interested in using DAX on virtiofs mounts for file sharing between the host and the guest and couldn't see a difference with this PR. But it's more than possible that I understood it wrong or that I'm doing it wrong.
You need to set the "dax" mount option on your mount, as the last commit (revert) does for the root filesystem. If that works and the flag shows up in /proc/mounts then it should be working as far as I know!
On July 8, 2024 4:23:23 PM GMT+09:00, David Gageot @.***> wrote:
The kernel will try to use it unconditionally if the mount flag is present (that's how I figured out what was missing, enabling DAX just broke everything until I got it right). I haven't truly tested it end to end though, but I'll find out soon enough if it's working as advertised since a use case I'm interested in relies on coherent /dev/shm memory mappings between the host and the guest. ^^ …
Thanks a lot! If I understand correctly, your use case is using DAX on the boot "disk" that's over virtiofs. I'm interested in using DAX on virtiofs mounts for file sharing between the host and the guest and couldn't see a difference with this PR. But it's more than possible that I understood it wrong or that I'm doing it wrong.
-- Reply to this email directly or view it on GitHub: https://github.com/containers/libkrun/pull/205#issuecomment-2213228182 You are receiving this because you were mentioned.
Message ID: @.***>
Thank! Yes, that's what I did and in does support the dax mount option now, whereas it didn't before. I didn't see any difference on the performance, though.
This one got superseded by #212