mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@lst.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH mmotm] fsnotify: don't slow everything down
Date: Sun, 17 May 2009 11:38:17 -0400	[thread overview]
Message-ID: <1242574698.5212.35.camel@dhcp231-142.rdu.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0905171445290.18657@blonde.anvils>

On Sun, 2009-05-17 at 14:52 +0100, Hugh Dickins wrote:
> Two little fixes to mmotm's fsnotify-parent-event-notification.patch:
> 
> Why is copying or building a kernel tree using twice as much system time
> as before?  Lots of time spent in __fsnotify_update_child_dentry_flags()
> when it shouldn't even get called.  Fix | to & in __fsnotify_parent().

I can't believe I didn't find that one in my testing, obviously it
doesn't hurt anything but performance.

> And it's probably a bad idea to have DCACHE_FSNOTIFY_PARENT_WATCHED
> sharing the same d_flags bit as DCACHE_COOKIE: though the COOKIE bit has
> prior claim, change it to keep the NOTIFY_PARENT_WATCHED bits together.

If people feel strongly I can come up with a system to reuse the inotify
flag now....  I planned on dropping the old inotify flag in a couple
releases when I finally evict inotify entirely, it would be a
performance hit, but I have a feeling a minimal one.  In any case, when
I push these patches along I'll probably move the new flag rather than
_COOKIE since long term they won't be 'together'

Acked-by: Eric Paris <eparis@redhat.com>


> Signed-off-by: Hugh Dickins <hugh@veritas.com>
> ---
> 
>  fs/notify/fsnotify.c   |    2 +-
>  include/linux/dcache.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> --- mmotm/fs/notify/fsnotify.c	2009-05-14 11:27:38.000000000 +0100
> +++ linux/fs/notify/fsnotify.c	2009-05-17 13:31:23.000000000 +0100
> @@ -84,7 +84,7 @@ void __fsnotify_parent(struct dentry *de
>  	bool send = false;
>  	bool should_update_children = false;
>  
> -	if (!(dentry->d_flags | DCACHE_FSNOTIFY_PARENT_WATCHED))
> +	if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED))
>  		return;
>  
>  	spin_lock(&dentry->d_lock);
> --- mmotm/include/linux/dcache.h	2009-05-14 11:27:39.000000000 +0100
> +++ linux/include/linux/dcache.h	2009-05-17 13:31:23.000000000 +0100
> @@ -183,7 +183,7 @@ d_iput:		no		no		no       yes
>  #define DCACHE_INOTIFY_PARENT_WATCHED	0x0020 /* Parent inode is watched by inotify */
>  #define DCACHE_FSNOTIFY_PARENT_WATCHED	0x0040 /* Parent inode is watched by some fsnotify listener */
>  
> -#define DCACHE_COOKIE		0x0040	/* For use by dcookie subsystem */
> +#define DCACHE_COOKIE		0x0080	/* For use by dcookie subsystem */
>  
>  extern spinlock_t dcache_lock;
>  extern seqlock_t rename_lock;


  reply	other threads:[~2009-05-17 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-17 13:52 Hugh Dickins
2009-05-17 15:38 ` Eric Paris [this message]
2009-05-21  9:46   ` Al Viro
2009-05-21 14:54     ` Eric Paris

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=1242574698.5212.35.camel@dhcp231-142.rdu.redhat.com \
    --to=eparis@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®