Cong Wang, who oversees the Traffic Control (TC) subsystem in the Linux kernel and is developing the Multikernel project, has introduced a new filesystem, DAXFS, in the list of Linux kernel developers. DAXFS uses RAM for data storage, operates in read-only mode, and functions similarly to the streamlined ramfs and tmpfs filesystems. The kernel module implementing DAXFS, along with the mkdaxfs utility for creating the filesystem, is published under the GPLv2 license. After review, integration of DAXFS into the main kernel code is being considered.
A key feature of the new filesystem is its use of the DAX (Direct Access) subsystem to bypass page caching and directly access shared physical memory. In ramfs and tmpfs, content is stored in the page cache, which, when using a single filesystem across multiple containers or kernels operated by the Multikernel technology, leads to multiple copies of data in physical memory. Filling ramfs and tmpfs also requires extra copying operations without the ability to map existing memory areas.
Direct access to memory in DAXFS eliminates unnecessary copying operations and organizes operations to bypass the traditional block device I/O stack and buffering mechanisms, while also preventing memory allocation fragmentation when sharing a single filesystem among different containers and multikernel kernels. DAXFS operates in Zero-Copy mode, directly serving file content from memory without unnecessary data duplication in the page cache, and allows mapping of contiguous regions of physical memory to each container or kernel instance. It also supports the use of the DMA-buf API for utilizing memory exported by GPUs, FPGAs/SmartNICs, or CXL devices.
The filesystem operates in read-only mode and is initialized by loading a pre-prepared filesystem image into memory, simplifying implementation, eliminating the need for memory allocation operations during runtime, and avoiding complicated device management mechanisms.
A key area of application for DAXFS is its use with Multikernel technology, which allows multiple independent instances of the Linux kernel to run on a single physical computer, providing direct access to hardware resources and enabling the launch of several isolated system environments.
DAXFS can also be used to facilitate shared access among multiple containers or kernels to a base system image located in shared memory; reducing overhead when accessing information in hardware accelerators; and allowing memory access from multiple hosts without network input/output or to persistent memory using devices based on the CXL (Compute Express Link) bus.
Source: opennet.ru
