Skip to content

Performance improvement for fanotify merge

Amir Goldstein linux-fsdevel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 4 repliesIn review
  2. v17 patches 28 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5fsnotify: allow fsnotify_{peek,remove}_first_event with empty queuefs/notify/fanotify/fanotify_user.c fs/notify/inotify/inotify_user.c fs/notify/notification.c +1 more+44 -370 replies
2/5fanotify: reduce event objectid to 29-bit hashfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h fs/notify/inotify/inotify_fsnotify.c +2 more+28 -220 replies
3/5fanotify: mix event info and pid into merge key hashfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h+66 -263 replies
4/5fsnotify: use hash table for faster events mergefs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c +3 more+123 -200 replies
5/5fanotify: limit number of event merge attemptsfs/notify/fanotify/fanotify.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] Performance improvement for fanotify merge

Jan,

Following is v2 for the fanotify_merge() performance improvements.

For more details on functional and performance tests please refer to v1 cover letter [1].

This version is much simpler than v1 using standard hlist. It was rebased and tested against 5.12-rc1 using LTP tests [2].

Thanks,
Amir.

Chanes since v1:
- Use hlist instead of multi notification lists
- Handling all hashing within fanotify backend
- Cram event key member together with event type
- Remove ifdefs and use constant queue hash bits
- Address other review comments on v1

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/
[2] https://github.com/amir73il/ltp/commits/fanotify_merge

Amir Goldstein (5):
fsnotify: allow fsnotify_{peek,remove}_first_event with empty queue
fanotify: reduce event objectid to 29-bit hash
fanotify: mix event info and pid into merge key hash
fsnotify: use hash table for faster events merge
fanotify: limit number of event merge attempts

 fs/notify/fanotify/fanotify.c        | 150 +++++++++++++++++++--------
 fs/notify/fanotify/fanotify.h        |  46 +++++++-
 fs/notify/fanotify/fanotify_user.c   |  65 ++++++++++--
 fs/notify/inotify/inotify_fsnotify.c |   9 +-
 fs/notify/inotify/inotify_user.c     |   7 +-
 fs/notify/notification.c             |  64 ++++++------
 include/linux/fsnotify_backend.h     |  23 ++--
 7 files changed, 263 insertions(+), 101 deletions(-)
Signature · 1 line
2.30.0