From: Partha Sarathi Satapathy <partha.satapathy@oracle.com>
To: partha.satapathy@oracle.com, jack@suse.cz, amir73il@gmail.com,
viro@zeniv.linux.org.uk, brauner@kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] fsnotify: Check parent watches without child dentry flags
Date: Wed, 7 Oct 2026 15:20:50 +0000 [thread overview]
Message-ID: <cover.1791373689.git.partha.satapathy@oracle.com> (raw)
This patch removes the cached-child dentry walk performed when a directory
first starts watching child events. Instead, the event path takes a reference
to the parent dentry and checks its child-watch mask. It also removes the
DCACHE_FSNOTIFY_PARENT_WATCHED flag and its update sites.
On the test host, 12 million files were populated and their positive dentries
were warmed before each run. With eight concurrent unlink/recreate workers
and 100 sole-watch add/close cycles, inotify_add_watch() measured:
Before After
run 1 average 107.420 ms 0.004 ms
run 2 average 125.433 ms 0.004 ms
run 1 maximum 122.811 ms 0.113 ms
run 2 maximum 141.198 ms 0.095 ms
The displayed 0.004 ms averages are rounded to three decimal places.
Maximum unlink/recreate latency was 777.852 and 770.569 ms before, versus
8.525 and 15.624 ms after. Those mutation maxima are supporting observations:
workers ran only during the watch-add loops, so the pre-change and post-change
mutation measurement windows had very different lengths.
One 100,000-iteration, single-worker open/close event-path run per mode gave:
Before After
none: p50/p99 ns 9564 / 15703 9684 / 15023
throughput 102221 ops/s 101432 ops/s
other: p50/p99 ns 9554 / 15573 9684 / 14962
throughput 99442 ops/s 101497 ops/s
parent: p50/p99 ns 12529 / 19179 12499 / 17716
throughput 78196 ops/s 78655 ops/s
The 'other' mode watches a different directory on the same filesystem, so it
exercises the superblock watcher path without target-file event delivery.
These are single runs; they do not establish a small event-path cost or its
absence. No open/close regression is apparent at this measurement resolution.
The test used worker CPU 2 and listener CPU 4 on kernels
6.19.0-rc8.V_fsn0.el9.omm0.x86_64 and 6.19.0-rc8.fsn3.el9.omm3.x86_64,
respectively. The test host reported XFS for its working directory.
The inotify correctness test and broader fsnotify functional test passed on
both kernels. The fanotify permission subtest skipped with EPERM in both runs,
so FAN_OPEN_PERM remains unvalidated by these results.
Partha Sarathi Satapathy (1):
fsnotify: Check parent watches without child dentry flags
fs/dcache.c | 4 --
fs/notify/fsnotify.c | 99 ++++++++------------------------
fs/notify/fsnotify.h | 6 --
fs/notify/mark.c | 35 -----------
include/linux/dcache.h | 1 -
include/linux/fsnotify.h | 7 +--
include/linux/fsnotify_backend.h | 29 ++--------
7 files changed, 29 insertions(+), 152 deletions(-)
next reply other threads:[~2026-10-07 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 15:20 Partha Sarathi Satapathy [this message]
2026-10-07 15:20 ` [PATCH 1/1] " Partha Sarathi Satapathy
2026-10-08 9:42 ` [PATCH 0/1] " Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1791373689.git.partha.satapathy@oracle.com \
--to=partha.satapathy@oracle.com \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®