linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org
Subject: [PATCH 0/2] More fsnotify hook optimizations
Date: Mon,  7 Jul 2025 19:07:02 +0200	[thread overview]
Message-ID: <20250707170704.303772-1-amir73il@gmail.com> (raw)

Jan,

Even since we did the FMODE_NONOTIFY optimization, it really bothered me
that we do not optimize out FAN_ACCESS_PERM, which I consider to be
unused baggage of the legacy API.

I finally figured out a way to get rid of this unneeded overhead of
all the read APIs.

Along the way, also added a trivial optimization for non-applicable
FAN_ACCESS_PERM on readdir and prepared the code towards adding
pre-dir-content events.

This passes the LTP tests, but please take a good look to see if I
missed anything.

Thanks,
Amir.

Amir Goldstein (2):
  fsnotify: merge file_set_fsnotify_mode_from_watchers() with open perm
    hook
  fsnotify: optimize FMODE_NONOTIFY_PERM for the common cases

 fs/file_table.c                  |  2 +-
 fs/notify/fsnotify.c             | 97 +++++++++++++++++++++-----------
 fs/open.c                        |  6 +-
 include/linux/fs.h               |  6 +-
 include/linux/fsnotify.h         | 35 ++----------
 include/linux/fsnotify_backend.h |  6 +-
 6 files changed, 80 insertions(+), 72 deletions(-)

-- 
2.43.0


             reply	other threads:[~2025-07-07 17:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-07 17:07 Amir Goldstein [this message]
2025-07-07 17:07 ` [PATCH 1/2] fsnotify: merge file_set_fsnotify_mode_from_watchers() with open perm hook Amir Goldstein
2025-07-07 17:07 ` [PATCH 2/2] fsnotify: optimize FMODE_NONOTIFY_PERM for the common cases Amir Goldstein
2025-07-08 11:25   ` Jan Kara
2025-07-08 13:32     ` Amir Goldstein
2025-07-07 17:13 ` [PATCH 0/2] More fsnotify hook optimizations Amir Goldstein

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=20250707170704.303772-1-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).