From: Dave Hansen <dave@sr71.net>
To: Andi Kleen <ak@linux.intel.com>
Cc: dave.hansen@linux.intel.com, akpm@linux-foundation.org,
jack@suse.cz, viro@zeniv.linux.org.uk, eparis@redhat.com,
john@johnmccutchan.com, rlove@rlove.org,
tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org,
paulmck@linux.vnet.ibm.com
Subject: Re: [RFC][PATCH] fs: optimize inotify/fsnotify code for unwatched files
Date: Fri, 19 Jun 2015 17:39:11 -0700 [thread overview]
Message-ID: <5584B62F.5080506@sr71.net> (raw)
In-Reply-To: <20150619233306.GT25760@tassilo.jf.intel.com>
On 06/19/2015 04:33 PM, Andi Kleen wrote:
>> > I *think* we can avoid taking the srcu_read_lock() for the
>> > common case where there are no actual marks on the file
>> > being modified *or* the vfsmount.
> What is so expensive in it? Just the memory barrier in it?
The profiling doesn't hit on the mfence directly, but I assume that the
overhead is coming from there. The "mov 0x8(%rdi),%rcx" is identical
before and after the barrier, but it appears much more expensive
_after_. That makes no sense unless the barrier is the thing causing it.
Here's how the annotation mode of 'perf top' breaks it down:
> │ ffffffff810fb480 <load0>:
> │ nop
> │ mov (%rdi),%rax
> 0.58 │ push %rbp
> │ incl %gs:0x7ef0f488(%rip)
> 1.73 │ mov %rsp,%rbp
> │ and $0x1,%eax
> │ movslq %eax,%rdx
> 0.58 │ mov 0x8(%rdi),%rcx
> │ incq %gs:(%rcx,%rdx,8)
> │ mfence
> 69.94 │ add $0x2,%rdx
> 7.51 │ mov 0x8(%rdi),%rcx
> 4.05 │ incq %gs:(%rcx,%rdx,8)
> 13.87 │ decl %gs:0x7ef0f45f(%rip)
> │ pop %rbp
> 1.73 │ ← retq
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2015-06-20 0:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 21:50 [RFC][PATCH] fs: optimize inotify/fsnotify code for unwatched files Dave Hansen
2015-06-19 23:33 ` Andi Kleen
2015-06-20 0:29 ` Paul E. McKenney
2015-06-20 0:39 ` Dave Hansen [this message]
2015-06-20 2:21 ` Paul E. McKenney
2015-06-20 18:02 ` Dave Hansen
2015-06-21 1:30 ` Paul E. McKenney
2015-06-22 13:28 ` Peter Zijlstra
2015-06-22 15:11 ` Paul E. McKenney
2015-06-22 15:20 ` Peter Zijlstra
2015-06-22 16:29 ` Paul E. McKenney
2015-06-22 19:03 ` Peter Zijlstra
2015-06-23 0:31 ` Paul E. McKenney
2015-06-22 18:50 ` Dave Hansen
2015-06-23 0:26 ` Paul E. McKenney
2015-06-24 16:50 ` Dave Hansen
2015-06-24 17:29 ` Paul E. McKenney
2015-06-22 18:52 ` Peter Zijlstra
2015-06-23 0:29 ` Paul E. McKenney
2015-06-23 15:17 ` 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=5584B62F.5080506@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=paulmck@linux.vnet.ibm.com \
--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