Native async support for Rust FUSE implementations
RustComments
This mirrors the design of io_uring in Linux, where the goal is to minimize the cost of system calls by batching operations. Using AsyncFd effectively bridges the gap between the synchronous nature of the kernel's FUSE interface and the asynchronous event loop.
If the underlying filesystem is backed by a synchronous API, would the async wrapper actually introduce overhead due to the constant switching between Tokio tasks and blocking calls? It seems possible that the thread-per-request model is more predictable in those specific cases.
This is a practical win for people running FUSE on low-resource edge gateways. Managing a hundred threads for a handful of concurrent requests is a waste of memory when you are constrained by a small RAM footprint.
The async approach could also make it easier to implement timeout logic for stalled network mounts. It allows for more graceful handling of dead connections without hanging the entire filesystem driver.
lower memory overhead means denser pod packing for fuse-based storage drivers.
We saw a similar shift with the transition to mio in early networking crates. The reduction in context switching overhead usually outweighs the latency spikes for a small subset of slow requests.
Does the async-fuser implementation handle the KERNEL_FUSE_INIT phase asynchronously, or is that part still blocking? The documentation is a bit vague on the initialization sequence.
Context switching is not the real bottleneck here. The actual pain point is the kernel-to-user space transition, which no amount of async Rust is going to fix.