linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] Further reduce overhead of fsnotify permission hooks
@ 2024-03-17 18:41 Amir Goldstein
  2024-03-17 18:41 ` [PATCH 01/10] fsnotify: rename fsnotify_{get,put}_sb_connectors() Amir Goldstein
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Amir Goldstein @ 2024-03-17 18:41 UTC (permalink / raw)
  To: Jan Kara, Jens Axboe; +Cc: Christian Brauner, linux-fsdevel, kernel test robot

Jan,

Commit 082fd1ea1f98 ("fsnotify: optimize the case of no parent watcher")
has reduced the CPU overhead of fsnotify hooks, but we can further
reduce the overhead of permission event hooks, by avoiding the call to
fsnotify() and fsnotify_parent() altogether when there are no permission
event watchers on the sb.

The main motivation for this work was to avoid the overhead that was
reported by kernel test robot on the patch that adds the upcoming
per-content event hooks (i.e. FS_PRE_ACCESS/FS_PRE_MODIFY).

Kernel test robot has confirmed that with this series, the addition of
pre-conent fsnotify hooks does not result in any regression [1].
Kernet test robot has also reported performance improvements in some
workloads compared to upstream on an earlier version of this series, but
still waiting for the final results.

For now, as you requested, I am posting this series for review.

Thanks,
Amir.

[1] https://lore.kernel.org/all/Zc7KmlQ1cYVrPMQ+@xsang-OptiPlex-9020/
[2] https://lore.kernel.org/all/202403141505.807a722b-oliver.sang@intel.com/

Amir Goldstein (10):
  fsnotify: rename fsnotify_{get,put}_sb_connectors()
  fsnotify: create helpers to get sb and connp from object
  fsnotify: create a wrapper fsnotify_find_inode_mark()
  fanotify: merge two checks regarding add of ignore mark
  fsnotify: pass object pointer and type to fsnotify mark helpers
  fsnotify: create helper fsnotify_update_sb_watchers()
  fsnotify: lazy attach fsnotify_sb_info state to sb
  fsnotify: move s_fsnotify_connectors into fsnotify_sb_info
  fsnotify: use an enum for group priority constants
  fsnotify: optimize the case of no permission event watchers

 fs/nfsd/filecache.c                |   4 +-
 fs/notify/dnotify/dnotify.c        |   4 +-
 fs/notify/fanotify/fanotify_user.c | 141 +++++++----------------
 fs/notify/fsnotify.c               |  23 +++-
 fs/notify/fsnotify.h               |  38 +++++--
 fs/notify/inotify/inotify_user.c   |   2 +-
 fs/notify/mark.c                   | 173 ++++++++++++++++++++++-------
 include/linux/fs.h                 |  14 +--
 include/linux/fsnotify.h           |  21 +++-
 include/linux/fsnotify_backend.h   |  93 +++++++++++-----
 kernel/audit_tree.c                |   2 +-
 kernel/audit_watch.c               |   2 +-
 12 files changed, 314 insertions(+), 203 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2024-04-04 15:53 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-17 18:41 [PATCH 00/10] Further reduce overhead of fsnotify permission hooks Amir Goldstein
2024-03-17 18:41 ` [PATCH 01/10] fsnotify: rename fsnotify_{get,put}_sb_connectors() Amir Goldstein
2024-03-27 10:01   ` Jan Kara
2024-03-27 10:05     ` Amir Goldstein
2024-03-17 18:41 ` [PATCH 02/10] fsnotify: create helpers to get sb and connp from object Amir Goldstein
2024-03-20  8:28   ` Christian Brauner
2024-03-20  8:34     ` Amir Goldstein
2024-03-20  9:57       ` Jan Kara
2024-03-17 18:41 ` [PATCH 03/10] fsnotify: create a wrapper fsnotify_find_inode_mark() Amir Goldstein
2024-03-17 18:41 ` [PATCH 04/10] fanotify: merge two checks regarding add of ignore mark Amir Goldstein
2024-03-17 18:41 ` [PATCH 05/10] fsnotify: pass object pointer and type to fsnotify mark helpers Amir Goldstein
2024-03-17 18:41 ` [PATCH 06/10] fsnotify: create helper fsnotify_update_sb_watchers() Amir Goldstein
2024-03-17 18:41 ` [PATCH 07/10] fsnotify: lazy attach fsnotify_sb_info state to sb Amir Goldstein
2024-03-20  8:47   ` Christian Brauner
2024-03-20  9:37     ` Amir Goldstein
2024-03-20  9:51       ` Jan Kara
2024-03-20 10:13         ` Christian Brauner
2024-03-17 18:41 ` [PATCH 08/10] fsnotify: move s_fsnotify_connectors into fsnotify_sb_info Amir Goldstein
2024-03-20  9:00   ` Christian Brauner
2024-03-17 18:41 ` [PATCH 09/10] fsnotify: use an enum for group priority constants Amir Goldstein
2024-03-17 18:41 ` [PATCH 10/10] fsnotify: optimize the case of no permission event watchers Amir Goldstein
2024-03-19  9:59 ` [PATCH 00/10] Further reduce overhead of fsnotify permission hooks Amir Goldstein
2024-04-04 14:34   ` Jan Kara
2024-04-04 14:41     ` Amir Goldstein
2024-04-04 15:53       ` Jan Kara

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).