Re: [PATCH 7/7] fsnotify: optimize merging of marks with no ignored masks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 02-12-20 14:07:13, Amir Goldstein wrote:
> fsnotify() tries to merge marks on all object types (sb, mount, inode)
> even if the object's mask shows no interest in the specific event type.
> 
> This is done for the case that the object has marks with the event type
> in their ignored mask, but the common case is that an object does not
> have any marks with ignored mask.
> 
> Set a bit in object's fsnotify mask during fsnotify_recalc_mask() to
> indicate the existence of any marks with ignored masks.
> 
> Instead of merging marks of all object types, only merge marks from
> objects that either showed interest in the specific event type or have
> any marks with ignored mask.
> 
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>

The idea looks sound to me and the patch fine (besides one bug noted
below). I'd be interested if an actual performance impact of this and
previous change could be noticed. Maybe some careful microbenchmark could
reveal it...

> +	/*
> +	 * Consider only marks that care about this type of event and marks with
> +	 * an ignored mask.
> +	 */
> +	test_mask |= FS_HAS_IGNORED_MASK;
> +	if (test_mask && sb->s_fsnotify_mask) {
		      ^^ Just '&' here.


								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux