FUSE Introducing Per-File DAX Option With Linux 5.17
Last year with Linux 5.10 FUSE added DAX support for use with VirtIO-FS. Like with DAX for other file-systems, enabling this direct access mode allows bypassing the page cache. For use-cases when running on persistent memory like devices or VirtIO, having this direct access to the storage device can be beneficial for performance. With Linux 5.17 FUSE is expanding the DAX support to allow per-inode control as well.
This work has been going on the past number of months to ultimately allow FUSE and VirtIO-FS to support per-file direct access (DAX). From the patch series her is the motivation for offering this finer-grained control:
The patch series by Alibaba's Jeffle Xu makes the FUSE infrastructure changes and protocol support for handling per-inode DAX, which comes out slightly different than the DAX behavior under other file-systems like XFS and EXT4. The per-inode behavior can be enabled with the dax=inode mount option.
This work was queued up this week in FUSE for-next ahead of the Linux 5.17 merge window.
This work has been going on the past number of months to ultimately allow FUSE and VirtIO-FS to support per-file direct access (DAX). From the patch series her is the motivation for offering this finer-grained control:
DAX may be limited in some specific situation. When the number of usable DAX windows is under watermark, the recalim routine will be triggered to reclaim some DAX windows. It may have a negative impact on the performance, since some processes may need to wait for DAX windows to be recalimed and reused then. To mitigate the performance degradation, the overall DAX window need to be expanded larger.
However, simply expanding the DAX window may not be a good deal in some scenario. To maintain one DAX window chunk (i.e., 2MB in size), 32KB (512 * 64 bytes) memory footprint will be consumed for page descriptors inside guest, which is greater than the memory footprint if it uses guest page cache when DAX disabled. Thus it'd better disable DAX for those files smaller than 32KB, to reduce the demand for DAX window and thus avoid the unworthy memory overhead.
Per-file DAX feature is introduced to address this issue, by offering a finer grained control for dax to users, trying to achieve a balance between performance and memory overhead.
The patch series by Alibaba's Jeffle Xu makes the FUSE infrastructure changes and protocol support for handling per-inode DAX, which comes out slightly different than the DAX behavior under other file-systems like XFS and EXT4. The per-inode behavior can be enabled with the dax=inode mount option.
This work was queued up this week in FUSE for-next ahead of the Linux 5.17 merge window.
6 Comments