Several issues:Yes, Jason. It is enough and works for SPDK.
- VDUSE needs to limit the total size of the bounce buffers (64M if I was not
wrong). Does it work for SPDK?
Since it's a kind of bounce buffer mainly for in-flight IO, so limited size like
64MB is enough.
- VDUSE can use hugepages but I'm not sure we can mandate hugepages (or weSame with your worry, I'm afraid too that it is a hard for a kernel module
need introduce new flags for supporting this)
to directly preallocate hugepage internal.
What I tried is that:
1. A simple agent daemon (represents for one device) `preallocates` and maps
dozens of 2MB hugepages (like 64MB) for one device.
2. The daemon passes its mapping addr&len and hugepage fd to kernel
module through created IOCTL.
3. Kernel module remaps the hugepages inside kernel.
4. Vhost user target gets and maps hugepage fd from kernel module
in vhost-user msg through Unix Domain Socket cmsg.
Then kernel module and target map on the same hugepage based
bounce buffer for in-flight IO.
If there is one option in VDUSE to map userspace preallocated memory, then
VDUSE should be able to mandate it even it is hugepage based.