From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:52678 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727225AbeJDQBg (ORCPT ); Thu, 4 Oct 2018 12:01:36 -0400 Date: Thu, 4 Oct 2018 11:09:16 +0200 From: Jan Kara To: Amir Goldstein Cc: Jan Kara , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v3 8/8] fsnotify: optimize away srcu_read_lock() for events on directories Message-ID: <20181004090916.GC11529@quack2.suse.cz> References: <20181003212539.2384-1-amir73il@gmail.com> <20181003212539.2384-9-amir73il@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181003212539.2384-9-amir73il@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu 04-10-18 00:25:39, Amir Goldstein wrote: > inotify and dnotify are always interested in events on directories. > fanotify is interested in events on directories only if user requested > them by flag FAN_ONDIR. > > For the fanotify supported events on directories (open/access/close), > if there is no inotify/dnotify associated marks and if none of the > associated fanotify marks have the FS_ISDIR flag, we can skip iterating > the marks and we avoid taking the srcu_read_lock() for all events on > directories. > > In order to enable this check in fsnotify() we set the FS_ISDIR flag > explicitly on all dnotify/inotify marks. > > Signed-off-by: Amir Goldstein > --- > fs/notify/dnotify/dnotify.c | 5 +++-- > fs/notify/fsnotify.c | 9 ++++++++- > fs/notify/inotify/inotify_user.c | 4 ++-- > 3 files changed, 13 insertions(+), 5 deletions(-) Looks good, except I think you forgot to convert kernel/audit_watch.c and kernel/audit_fsnotify.c which also need to set FS_ISDIR... Honza -- Jan Kara SUSE Labs, CR