[PATCH RESEND v4 0/4] kernfs: make ->attr.open RCU protected.
From: Imran Khan
Date: Thu Jun 02 2022 - 02:39:34 EST
I have not received any feedback about v4 of this patchset. So RESENDing
after rebase on tag next-20220601.
The patches in this version of the patch set are as follows:
PATCH-1: Make kernfs_open_node->attr.open RCU protected.
PATCH-2: Change kernfs_notify_list to llist.
PATCH-3: Introduce interface to access kernfs_open_file_mutex.
PATCH-4: Replace global kernfs_open_file_mutex with hashed mutexes.
Changes since v3:
- Rebase on tag next-20220601
- Rename RCU access related helpers and update their description
- Address errors reported by kernel test robot
- Include Acked-by tags from Tejun for the acked patches (PATCH-2,3,4)
Changes since v2:
- Rebase on tag next-20220510
- Remove PATCH-1 of v2 because it is present in tag next-20220510
- Include Acked-by tags from Tejun for the acked patches (PATCH-2 and PATCH-3)
Cover letter for v2:
--------------------------------------------------------------------------
I have not yet received any feedback about v1 of this patchset [2] but
in the meantime an old version of first patch from [3] has been integrated in
linux-next. Functionally first patch in both [2] and [3] are identical.
It's just that [2] has renamed one of the functions to better reflect the fact
that we are no longer using reference counting for kernfs_open_node.
In this version, I have just modified first patch of v1 so that we use the
modified function name as done in [2] and avoid those parts that are already
present in linux-next now. The remaining 4 patches (PATCH-2 to PATCH-5) are
identical in both v1 and v2 albeit v2 has been rebased on tag next-20220503.
Changes since v1:
- Rebase on tag next-20220503
[2]: https://lore.kernel.org/lkml/20220428055431.3826852-1-imran.f.khan@xxxxxxxxxx/
[3]: https://lore.kernel.org/lkml/20220324103040.584491-1-imran.f.khan@xxxxxxxxxx/
Original cover letter
-------------------------------------------------------
This patchset contains subset of patches (after addressing review comments)
discussed at [1]. Since [1] is replacing multiple global locks and since
each of these locks can be removed independently, it was decided that we
should make these changes in parts i.e first get one set of optimizations
integrated and then work on top of those further.
The patches in this change set introduce following changes:
PATCH-1: Remove reference counting for kernfs_open_node.
PATCH-2: Make kernfs_open_node->attr.open RCU protected.
PATCH-3: Change kernfs_notify_list to llist.
PATCH-4: Introduce interface to access kernfs_open_file_mutex.
PATCH-5: Replace global kernfs_open_file_mutex with hashed mutexes.
[1] https://lore.kernel.org/lkml/YmLfxHcekrr89IFl@xxxxxxxxxxxxxxx/
----------------------------------------------------------------
Imran Khan (4):
kernfs: make ->attr.open RCU protected.
kernfs: Change kernfs_notify_list to llist.
kernfs: Introduce interface to access global kernfs_open_file_mutex.
kernfs: Replace global kernfs_open_file_mutex with hashed mutexes.
fs/kernfs/file.c | 270 +++++++++++++++++++++++-------------
fs/kernfs/kernfs-internal.h | 4 +
fs/kernfs/mount.c | 19 +++
include/linux/kernfs.h | 61 +++++++-
4 files changed, 258 insertions(+), 96 deletions(-)
base-commit: 5d8e7e3bbaaf115a935accd269873469928848c0
--
2.30.2