All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jan Kara <jack@suse.cz>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [GIT PULL] Fsnotify cleanups
Date: Mon, 11 Jun 2018 18:12:49 +0200	[thread overview]
Message-ID: <20180611161249.d3g64fcfuwezlxeq@quack2.suse.cz> (raw)
In-Reply-To: <CAOQ4uxiGom8qdMA+8Gy+LHhR8fF8fX5nHbYRHHxjDgou6BxYiA@mail.gmail.com>

On Sat 09-06-18 11:00:17, Amir Goldstein wrote:
> On Sat, Jun 9, 2018 at 9:57 AM, Amir Goldstein <amir73il@gmail.com> wrote:
> > The only code that needs to test the shadow mask before following into
> > connector is the optimization code in start of fsnotify() which was not
> > generalized anyway and where the mask optimization is more important
> > for mount watches.
> >
> 
> No. That's not true, there is also fsnotify_inode_watches_children() and
> __fsnotify_parent(). But I think the only bits in the mask that really matter
> for optimizing inode watches are FS_ACCESS and FS_EVENT_ON_CHILD
> and those could be encoded in lower bits of connector pointer.

Actually for children events, we have a dentry flag
DCACHE_FSNOTIFY_PARENT_WATCHED and that should catch 99% of situation.
FS_EVENT_ON_CHILD is used only to verify event really should be delivered
since the DCACHE_FSNOTIFY_PARENT_WATCHED flag is cleared lazily. Or where
do you think the performance of FS_EVENT_ON_CHILD checking matters?

Also I'm not 100% sure just having FS_ACCESS checked quickly is going to
buy us that much. We have quite a few event types and if someone is
watching for a different event type than the current event (just not
FS_ACCESS), we'll just have to pay the cost of srcu_read_lock and
indirection. So it just depends whether we consider such loads worthwhile
or not...

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2018-06-11 16:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 15:02 [GIT PULL] Fsnotify cleanups Jan Kara
2018-06-07 16:34 ` Linus Torvalds
2018-06-08 13:27   ` Jan Kara
2018-06-08 20:34     ` Linus Torvalds
2018-06-09  6:57       ` Amir Goldstein
2018-06-09  8:00         ` Amir Goldstein
2018-06-11 16:12           ` Jan Kara [this message]
2018-06-11 16:31             ` Amir Goldstein
2018-06-09 17:30         ` Linus Torvalds
2018-06-09 18:46           ` Amir Goldstein
2018-06-10 17:49             ` Amir Goldstein
2018-06-11 13:36               ` Jan Kara
2018-06-11 13:58                 ` Amir Goldstein
2018-06-11 16:03                   ` Jan Kara
2018-06-11 16:38                     ` Amir Goldstein
2018-06-11 19:51                       ` Amir Goldstein
2018-06-13 13:21                         ` Jan Kara
2018-06-13 13:56                           ` Amir Goldstein
2018-06-13 22:17                             ` Amir Goldstein
2018-06-22 16:44                               ` Jan Kara
2018-06-23  7:42                                 ` Amir Goldstein
2018-06-11 11:08       ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180611161249.d3g64fcfuwezlxeq@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.