linux-stable/fs/configfs
Seamus Connor 84147f4e84 configfs: improve item creation performance
As the size of a directory increases item creation slows down.
Optimizing access to s_children removes this bottleneck.

dirents are already pinned into the cache, there is no need to scan the
s_children list looking for duplicate Items. The configfs_dirent_exists
check is moved to a location where it is called only during subsystem
initialization.

d_lookup will only need to call configfs_lookup in the case where the
item in question is not pinned to dcache. The only items not pinned to
dcache are attributes. These are placed at the front of the s_children
list, whilst pinned items are inserted at the back. configfs_lookup
stops scanning when it encounters the first pinned entry in s_children.

The assumption of the above optimizations is that there will be few
attributes, but potentially many Items in a given directory.

Signed-off-by: Seamus Connor <sconnor@purestorage.com>
Reviewed-by: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2024-11-14 07:45:20 +01:00
..
configfs_internal.h configfs: improve item creation performance 2024-11-14 07:45:20 +01:00
dir.c configfs: improve item creation performance 2024-11-14 07:45:20 +01:00
file.c configfs: restore the kernel v5.13 text attribute write behavior 2021-08-09 16:56:00 +02:00
inode.c configfs: remove unused configfs_hash_and_remove 2024-11-14 07:45:19 +01:00
item.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mount.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
symlink.c fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00