Hi Amir! On Wed 23-02-22 17:14:36, Amir Goldstein wrote: > The two patches are functionally unrelated, but they both incorporate > information from the ignored mask into the object's interest mask. > > The 1st patch is a fix for a minor functional bug. > LTP test fanotify10 has a workaround for this bug, see comment: > /* XXX: temporary hack may be removed in the future */ > The test is to remove the hack and see that fanotify10 passes. > > The 2nd patch is a performance optimization that you suggested. > Last time I posted it, you asked for performance numbers [1], so I ran > some micro benchmarks (see results below [3]). > > Note that the other patch from that first posting ("optimize merging of > marks with no ignored masks") did not demonstrate any visible > improvements with the benchmarks that I ran so I left it out. > > The micro benchmark is a simple program [2] that writes 1 byte at a time > in a loop. I ran it on tmpfs once without any mark and once with a mark > with a mask for DELETE_SELF event. > > On upstream kernel, runtime with a mark is always ~25% longer. > With the optimization patch applied, runtime with a mark is most of the > time (but not always) very close to the runtime without a mark. > > [1] https://lore.kernel.org/linux-fsdevel/20201203145220.GH11854@xxxxxxxxxxxxxx/ > [2] https://github.com/amir73il/fsnotify-utils/blob/master/src/test/ioloop.c > [3] Performance test results: Thanks! Both patches look good to me, I have added them to my tree (just included shortened performance results into the changelog of the second patch). Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR