[PATCH kernfs 0/3] kernfs: switch global locks to per-fs lock
From: alexjlzheng
Date: Fri Apr 11 2025 - 14:32:36 EST
From: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx>
The kernfs implementation has big lock granularity so every kernfs-based
(e.g., sysfs, cgroup) fs are able to compete the locks. This patchset
switches the global locks to per-fs locks.
In fact, the implementation of global locks has not yet introduced
performance issues. But in the long run, more and more file systems will
be implemented based on the kernfs framework, so this optimization is
meaningful.
Jinliang Zheng (3):
kernfs: switch global kernfs_idr_lock to per-fs lock
kernfs: switch global kernfs_rename_lock to per-fs lock
kernfs: switch global kernfs_pr_cont_lock to per-fs lock
fs/kernfs/dir.c | 74 ++++++++++++++++++-------------------
fs/kernfs/kernfs-internal.h | 27 ++++++++++++--
2 files changed, 59 insertions(+), 42 deletions(-)
--
2.48.1