]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: limit number of event merge attempts
authorAmir Goldstein <amir73il@gmail.com>
Thu, 4 Mar 2021 10:48:26 +0000 (12:48 +0200)
committerJan Kara <jack@suse.cz>
Tue, 16 Mar 2021 15:38:29 +0000 (16:38 +0100)
commit6e30f0be02b5a1de4b2ac1d634876126625a7c7b
tree0f42ff64d788a11932bebc8fd4ce2b7ff11618f4
parent26315e58ffae2a9084355a0518ba628448d6f42b
fanotify: limit number of event merge attempts

Event merges are expensive when event queue size is large, so limit the
linear search to 128 merge tests.

In combination with 128 size hash table, there is a potential to merge
with up to 16K events in the hashed queue.

Link: https://lore.kernel.org/r/20210304104826.3993892-6-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c