FUSE Introducing the DAX option by file with Linux 5.17

0


[ad_1]

Last year, with Linux 5.10, FUSE added DAX support for use with VirtIO-FS. As with DAX for other file systems, enabling this direct access mode will bypass the page cache. For use cases when running on persistent memory like peripherals or VirtIO, having this direct access to the storage device can be beneficial for performance. With Linux 5.17, FUSE extends support for DAX to also allow inode control.

This work took several months to eventually allow FUSE and VirtIO-FS to support Direct File Access (DAX). From the series of patches, she is the motivation to offer this finer control:

DAX may be limited in certain specific situations. When the number of usable DAX windows is under the watermark, the recalim routine will be triggered to recover some DAX windows. This can negatively impact performance, as some processes may need to wait for DAX windows to be recalibrated and then reused. To mitigate performance degradation, the overall DAX window should be maximized.

However, just extending the DAX window may not be a good deal in some scenarios. To keep a DAX window block (i.e. 2MB), a 32KB (512 * 64 byte) memory footprint will be consumed for page descriptors inside the guest, which is greater than the memory footprint if it uses the guest page cache when DAX is disabled. Therefore, it is better to disable DAX for files smaller than 32KB, in order to reduce the DAX window demand and thus avoid outrageous memory overload.

The per-file DAX feature is introduced to address this issue, providing finer control for Dax to users, trying to strike a balance between performance and memory overhead.

Alibaba’s Jeffle Xu patch series brings changes to the FUSE infrastructure and protocol support for inode management of DAX, which is slightly different from DAX behavior under other file systems like XFS and EXT4. Behavior by inode can be enabled with the dax = inode mounting option.

This work was queued this week in FUSE for-next ahead of the Linux 5.17 merge window.

[ad_2]

Share.

Comments are closed.