  Emerging high performance non-volatile memories recall the importance of
efficient file system design. To avoid the virtual file system (VFS) and
syscall overhead as in these kernel-based file systems, recent works deploy
file systems directly in user level. Unfortunately, a userlevel file system can
easily be corrupted by a buggy program with misused pointers, and is hard to
scale on multi-core platforms which incorporates a centralized coordination
service. In this paper, we propose KucoFS, a Kernel and user-level
collaborative file system. It consists of two parts: a user-level library with
direct-access interfaces, and a kernel thread, which performs metadata updates
and enforces write protection by toggling the permission bits in the page
table. Hence, KucoFS achieves both direct-access of user-level designs and
fine-grained write protection of kernel-level ones. We further explore its
scalability to multicores: For metadata scalability, KucoFS rebalances the
pathname resolution overhead between the kernel and userspace, by adopting the
index offloading technique. For data access efficiency, it coordinates the data
allocation between kernel and userspace, and uses range-lock write and
lock-free read to improve concurrency. Experiments on Optane DC persistent
memory show that KucoFS significantly outperforms existing file systems and
shows better scalability.
