fsnotify: use hash table for faster events merge
authorAmir Goldstein <amir73il@gmail.com>
Thu, 4 Mar 2021 10:48:25 +0000 (12:48 +0200)
committerJan Kara <jack@suse.cz>
Tue, 16 Mar 2021 15:37:51 +0000 (16:37 +0100)
commit94e00d28a680dff18805ca472b191364347d2234
treed1b50fca5c1d57faf50a0a387552385dde90975f
parent7e3e5c6943994943eb76cab2d3a1806bc10b9045
fsnotify: use hash table for faster events merge

In order to improve event merge performance, hash events in a 128 size
hash table by the event merge key.

The fanotify_event size grows by two pointers, but we just reduced its
size by removing the objectid member, so overall its size is increased
by one pointer.

Permission events and overflow event are not merged so they are also
not hashed.

Link: https://lore.kernel.org/r/20210304104826.3993892-5-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify.h
fs/notify/fanotify/fanotify_user.c
fs/notify/inotify/inotify_fsnotify.c
fs/notify/notification.c
include/linux/fsnotify_backend.h