diff options
author | Amir Goldstein <[email protected]> | 2024-01-16 13:32:47 +0200 |
---|---|---|
committer | Jan Kara <[email protected]> | 2024-01-24 16:26:03 +0100 |
commit | 082fd1ea1f98e6bb1189213a2404ddd774de3843 (patch) | |
tree | c000bfff67879692051bb885f536a28024547aae /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 615d300648869c774bd1fe54b4627bb0c20faed4 (diff) |
fsnotify: optimize the case of no parent watcher
If parent inode is not watching, check for the event in masks of
sb/mount/inode masks early to optimize out most of the code in
__fsnotify_parent() and avoid calling fsnotify().
Jens has reported that this optimization improves BW and IOPS in an
io_uring benchmark by more than 10% and reduces perf reported CPU usage.
before:
+ 4.51% io_uring [kernel.vmlinux] [k] fsnotify
+ 3.67% io_uring [kernel.vmlinux] [k] __fsnotify_parent
after:
+ 2.37% io_uring [kernel.vmlinux] [k] __fsnotify_parent
Reported-and-tested-by: Jens Axboe <[email protected]>
Link: https://lore.kernel.org/linux-fsdevel/[email protected]/
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Message-Id: <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions