From: Dave Hansen <dave@sr71.net>
To: Eric Paris <eparis@redhat.com>
Cc: dave.hansen@linux.intel.com, akpm@linux-foundation.org,
jack@suse.cz, viro@zeniv.linux.org.uk, john@johnmccutchan.com,
rlove@rlove.org, tim.c.chen@linux.intel.com, ak@linux.intel.com,
linux-kernel@vger.kernel.org
Subject: Re: [RFCv2][PATCH 1/7] fs: optimize inotify/fsnotify code for unwatched files
Date: Thu, 25 Jun 2015 09:28:25 -0700 [thread overview]
Message-ID: <558C2C29.7040106@sr71.net> (raw)
In-Reply-To: <1435193823.19444.36.camel@redhat.com>
On 06/24/2015 05:57 PM, Eric Paris wrote:
> On Wed, 2015-06-24 at 17:16 -0700, Dave Hansen wrote:
>> + if (!to_tell->i_fsnotify_marks.first &&
>> + (!mnt || !mnt->mnt_fsnotify_marks.first))
>> + return 0;
>
> two useless peeps from the old peanut gallery of long lost....
>
> 1) should you actually move this check up before the IN_MODIFY check?
> This seems like it would be by far the most common case, and you'd save
> yourself a bunch of useless conditionals/bit operations.
Doing that actually makes fsnotify() 82 bytes smaller for me. I think
you're also right that the new check is a much more general condition
than the existing one. I'll move it up when I post again.
> 2) do you want to use hlist_empty(&to_tell->i_fsnotify_marks) instead,
> for readability (and they are static inline, so compiled code is the
> same)
Yeah I guess that makes sense. The only thing that the current code is
nice for is that it makes it obvious that the .first checks match with
the srcu_dereference()s done below.
prev parent reply other threads:[~2015-06-25 16:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 0:16 [RFCv2][PATCH 1/7] fs: optimize inotify/fsnotify code for unwatched files Dave Hansen
2015-06-25 0:16 ` [RFCv2][PATCH 2/7] fs: use RCU for free_super() vs. __sb_start_write() Dave Hansen
2015-06-26 12:59 ` Jan Kara
2015-06-25 0:16 ` [RFCv2][PATCH 3/7] fs: fsnotify: replace memory barrier in __sb_end_write() with RCU Dave Hansen
2015-06-26 13:07 ` Jan Kara
2015-06-25 0:16 ` [RFCv2][PATCH 4/7] fsnotify: encapsulate embedded fsnotify data in a single spot Dave Hansen
2015-06-26 13:19 ` Jan Kara
2015-06-25 0:16 ` [RFCv2][PATCH 5/7] fsnotify: use fsnotify_head for vfsmount data Dave Hansen
2015-06-25 0:16 ` [RFCv2][PATCH 6/7] fsnotify: change fsnotify_recalc_mask() conventions Dave Hansen
2015-06-25 0:16 ` [RFCv2][PATCH 7/7] fsnotify: track when ignored mask clearing is needed Dave Hansen
2015-06-26 13:26 ` Jan Kara
2015-06-25 0:57 ` [RFCv2][PATCH 1/7] fs: optimize inotify/fsnotify code for unwatched files Eric Paris
2015-06-25 16:28 ` Dave Hansen [this message]
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=558C2C29.7040106@sr71.net \
--to=dave@sr71.net \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=eparis@redhat.com \
--cc=jack@suse.cz \
--cc=john@johnmccutchan.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rlove@rlove.org \
--cc=tim.c.chen@linux.intel.com \
--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