From: Sedat Dilek <sedat.dilek@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Waiman Long <waiman.long@hp.com>, Ingo Molnar <mingo@kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jeff Layton <jlayton@redhat.com>,
Miklos Szeredi <mszeredi@suse.cz>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Andi Kleen <andi@firstfloor.org>,
"Chandramouleeswaran, Aswin" <aswin@hp.com>,
"Norton, Scott J" <scott.norton@hp.com>
Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount
Date: Sun, 1 Sep 2013 17:45:03 +0200 [thread overview]
Message-ID: <CA+icZUWPUDorK+9KRD-H3FpbDeC_7LMatzrYk35jZk13vNuLBQ@mail.gmail.com> (raw)
In-Reply-To: <CA+55aFwU054C+zC+G+JrF4ngWvVmvD9WPGWaT_2=nF2j7bpHxA@mail.gmail.com>
On Sun, Sep 1, 2013 at 5:32 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Sun, Sep 1, 2013 at 3:01 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>>
>> Looks like this is now 10x faster: ~2.66Mloops (debug) VS.
>> ~26.60Mloops (no-debug).
>
> Ok, that's getting to be in the right ballpark.
>
> But your profile is still odd.
>
>> Samples: 159K of event 'cycles:pp', Event count (approx.): 76968896763
>> 12,79% t_lockref_from- [kernel.kallsyms] [k] irq_return
>> 4,36% t_lockref_from- [kernel.kallsyms] [k] __ticket_spin_lock
>
> If you do the profile with "-g", what are the top callers of this? You
> shouldn't see any spinlock load from the path lookup, but you have all
> these other things going on..
>
$ sudo ~/src/linux-kernel/linux/tools/perf/perf record -g -e cycles:pp
./scripts/t_lockref_from-linus
Total loops: 26205085
[ perf record: Woken up 77 times to write data ]
[ perf record: Captured and wrote 19.778 MB perf.data (~864092 samples) ]
$ sudo ~/src/linux-kernel/linux/tools/perf/perf report <--- I used
here with -f option, the last one, dropped here.
Samples: 160K of event 'cycles:pp', Event count (approx.): 77003901089
+ 12,46% t_lockref_from- [kernel.kallsyms] [k] irq_return
+ 4,86% t_lockref_from- [kernel.kallsyms] [k] lockref_get_or_lock
+ 4,42% t_lockref_from- [kernel.kallsyms] [k] __ticket_spin_lock
+ 4,28% t_lockref_from- [kernel.kallsyms] [k] __acct_update_integrals
+ 3,97% t_lockref_from- [kernel.kallsyms] [k] user_exit
+ 3,04% t_lockref_from- [kernel.kallsyms] [k] local_clock
+ 2,71% t_lockref_from- [kernel.kallsyms] [k] kmem_cache_alloc
+ 2,50% t_lockref_from- [kernel.kallsyms] [k] link_path_walk
+ 2,46% t_lockref_from- libc-2.15.so [.] __xstat64
+ 2,38% t_lockref_from- [kernel.kallsyms] [k] kmem_cache_free
+ 1,96% t_lockref_from- [kernel.kallsyms] [k] path_lookupat
+ 1,88% t_lockref_from- [kernel.kallsyms] [k] __d_lookup_rcu
+ 1,87% t_lockref_from- [kernel.kallsyms] [k] tracesys
+ 1,84% t_lockref_from- [kernel.kallsyms] [k]
rcu_eqs_exit_common.isra.43
+ 1,81% t_lockref_from- [kernel.kallsyms] [k]
rcu_eqs_enter_common.isra.45
+ 1,80% t_lockref_from- [kernel.kallsyms] [k] user_enter
+ 1,79% t_lockref_from- [kernel.kallsyms] [k] sched_clock_cpu
+ 1,61% t_lockref_from- [kernel.kallsyms] [k] native_read_tsc
+ 1,56% t_lockref_from- [kernel.kallsyms] [k] cp_new_stat
+ 1,52% t_lockref_from- [kernel.kallsyms] [k] lockref_put_or_lock
+ 1,51% t_lockref_from- [kernel.kallsyms] [k] account_system_time
+ 1,46% t_lockref_from- [kernel.kallsyms] [k] path_init
+ 1,46% t_lockref_from- [kernel.kallsyms] [k] copy_user_generic_unrolled
+ 1,42% t_lockref_from- [kernel.kallsyms] [k] syscall_trace_enter
+ 1,38% t_lockref_from- [kernel.kallsyms] [k] jiffies_to_timeval
+ 1,32% t_lockref_from- [kernel.kallsyms] [k] lookup_fast
+ 1,31% t_lockref_from- [kernel.kallsyms] [k] native_sched_clock
+ 1,24% t_lockref_from- [kernel.kallsyms] [k] getname_flags
+ 1,17% t_lockref_from- [kernel.kallsyms] [k] vfs_getattr
+ 1,15% t_lockref_from- [kernel.kallsyms] [k] get_vtime_delta
+ 1,03% t_lockref_from- [kernel.kallsyms] [k] syscall_trace_leave
+ 0,95% t_lockref_from- [kernel.kallsyms] [k] generic_fillattr
+ 0,94% t_lockref_from- [kernel.kallsyms] [k] user_path_at_empty
+ 0,93% t_lockref_from- [kernel.kallsyms] [k] system_call_after_swapgs
+ 0,93% t_lockref_from- [kernel.kallsyms] [k] account_user_time
+ 0,89% t_lockref_from- [kernel.kallsyms] [k] strncpy_from_user
+ 0,86% t_lockref_from- [kernel.kallsyms] [k] complete_walk
+ 0,80% t_lockref_from- [kernel.kallsyms] [k] filename_lookup
+ 0,80% t_lockref_from- [kernel.kallsyms] [k] vfs_fstatat
+ 0,78% t_lockref_from- [kernel.kallsyms] [k] generic_permission
+ 0,77% t_lockref_from- [kernel.kallsyms] [k] __ticket_spin_unlock
+ 0,73% t_lockref_from- [kernel.kallsyms] [k] __inode_permission
+ 0,69% t_lockref_from- [kernel.kallsyms] [k] vtime_account_user
+ 0,66% t_lockref_from- [kernel.kallsyms] [k] d_rcu_to_refcount
+ 0,61% t_lockref_from- [kernel.kallsyms] [k] common_perm
+ 0,60% t_lockref_from- [kernel.kallsyms] [k] rcu_eqs_enter
+ 0,59% t_lockref_from- [kernel.kallsyms] [k] dput
+ 0,54% t_lockref_from- [kernel.kallsyms] [k] vtime_user_enter
+ 0,51% t_lockref_from- [kernel.kallsyms] [k] cpuacct_account_field
+ 0,50% t_lockref_from- [kernel.kallsyms] [k] mntput
+ 0,48% t_lockref_from- [kernel.kallsyms] [k] lg_local_lock
+ 0,48% t_lockref_from- [kernel.kallsyms] [k] apparmor_inode_getattr
+ 0,45% t_lockref_from- t_lockref_from-linus [.] start_routine
+ 0,45% t_lockref_from- [kernel.kallsyms] [k] __vtime_account_system
Press '?' for help on key bindings
- Sedat -
>> 4,36% t_lockref_from- [kernel.kallsyms] [k] __acct_update_integrals
>> 4,07% t_lockref_from- [kernel.kallsyms] [k] user_exit
>> 3,12% t_lockref_from- [kernel.kallsyms] [k] local_clock
>> 2,83% t_lockref_from- [kernel.kallsyms] [k] lockref_get_or_lock
>> 2,73% t_lockref_from- [kernel.kallsyms] [k] kmem_cache_alloc
>> 2,62% t_lockref_from- [kernel.kallsyms] [k] __d_lookup_rcu
>
> You're spending more time on the task stats than on the actual lookup.
> Maybe you should turn off CONFIG_TASKSTATS..But why that whole
> irq_return thing? Odd.
>
Yes, I have CONFIG_TASKSTATS=y.
I can try a -4 build w/o it.
- Sedat -
next prev parent reply other threads:[~2013-09-01 15:45 UTC|newest]
Thread overview: 151+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 3:12 [PATCH v7 0/4] Lockless update of reference count protected by spinlock Waiman Long
2013-08-06 3:12 ` [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount Waiman Long
2013-08-29 1:40 ` Linus Torvalds
2013-08-29 4:44 ` Benjamin Herrenschmidt
2013-08-29 7:00 ` Ingo Molnar
2013-08-29 16:43 ` Linus Torvalds
2013-08-29 19:25 ` Linus Torvalds
2013-08-29 23:42 ` Linus Torvalds
2013-08-30 0:26 ` Benjamin Herrenschmidt
2013-08-30 0:49 ` Linus Torvalds
2013-08-30 2:06 ` Michael Neuling
2013-08-30 2:30 ` Benjamin Herrenschmidt
2013-08-30 2:35 ` Linus Torvalds
2013-08-30 2:45 ` Benjamin Herrenschmidt
2013-08-30 2:31 ` Linus Torvalds
2013-08-30 2:43 ` Benjamin Herrenschmidt
2013-08-30 7:16 ` Ingo Molnar
2013-08-30 15:28 ` Linus Torvalds
2013-08-30 3:12 ` Waiman Long
2013-08-30 3:54 ` Linus Torvalds
2013-08-30 7:55 ` Sedat Dilek
2013-08-30 8:10 ` Sedat Dilek
2013-08-30 9:27 ` Sedat Dilek
2013-08-30 9:48 ` Ingo Molnar
2013-08-30 9:56 ` Sedat Dilek
2013-08-30 9:58 ` Sedat Dilek
2013-08-30 10:29 ` Sedat Dilek
2013-08-30 10:36 ` Peter Zijlstra
2013-08-30 10:44 ` Sedat Dilek
2013-08-30 10:46 ` Sedat Dilek
2013-08-30 10:52 ` Peter Zijlstra
2013-08-30 10:57 ` Sedat Dilek
2013-08-30 14:05 ` Sedat Dilek
2013-08-30 11:19 ` Sedat Dilek
2013-08-30 10:38 ` Sedat Dilek
2013-08-30 15:34 ` Linus Torvalds
2013-08-30 15:38 ` Sedat Dilek
2013-08-30 16:12 ` Steven Rostedt
2013-08-30 16:16 ` Sedat Dilek
2013-08-30 18:42 ` Linus Torvalds
2013-08-30 16:32 ` Linus Torvalds
2013-08-30 16:37 ` Sedat Dilek
2013-08-30 16:52 ` Linus Torvalds
2013-08-30 17:11 ` Sedat Dilek
2013-08-30 17:26 ` Linus Torvalds
2013-09-01 10:01 ` Sedat Dilek
2013-09-01 10:33 ` Sedat Dilek
2013-09-01 15:32 ` Linus Torvalds
2013-09-01 15:45 ` Sedat Dilek [this message]
2013-09-01 15:55 ` Linus Torvalds
2013-09-02 10:30 ` Sedat Dilek
2013-09-02 16:09 ` David Ahern
2013-09-01 20:59 ` Linus Torvalds
2013-09-01 21:23 ` Al Viro
2013-09-01 22:16 ` Linus Torvalds
2013-09-01 22:35 ` Al Viro
2013-09-01 22:44 ` Al Viro
2013-09-01 22:58 ` Linus Torvalds
2013-09-01 22:48 ` Linus Torvalds
2013-09-01 23:30 ` Al Viro
2013-09-02 0:12 ` Linus Torvalds
2013-09-02 0:50 ` Linus Torvalds
2013-09-02 7:05 ` Ingo Molnar
2013-09-02 16:44 ` Linus Torvalds
2013-09-03 10:15 ` Ingo Molnar
2013-09-03 15:41 ` Linus Torvalds
2013-09-03 18:34 ` Linus Torvalds
2013-09-03 19:19 ` Ingo Molnar
2013-09-03 21:05 ` Linus Torvalds
2013-09-03 21:13 ` Linus Torvalds
2013-09-03 21:34 ` Linus Torvalds
2013-09-03 21:39 ` Linus Torvalds
2013-09-03 14:08 ` Pavel Machek
2013-09-03 22:37 ` Sedat Dilek
2013-09-03 22:55 ` Dave Jones
2013-09-03 23:05 ` Sedat Dilek
2013-09-03 23:15 ` Dave Jones
2013-09-03 23:20 ` Sedat Dilek
2013-09-03 23:45 ` Sedat Dilek
2013-08-30 18:33 ` Waiman Long
2013-08-30 18:53 ` Linus Torvalds
2013-08-30 19:20 ` Waiman Long
2013-08-30 19:33 ` Linus Torvalds
2013-08-30 20:15 ` Waiman Long
2013-08-30 20:43 ` Linus Torvalds
2013-08-30 20:54 ` Al Viro
2013-08-30 21:03 ` Linus Torvalds
2013-08-30 21:44 ` Al Viro
2013-08-30 22:30 ` Linus Torvalds
2013-08-31 21:23 ` Al Viro
2013-08-31 22:49 ` Linus Torvalds
2013-08-31 23:27 ` Al Viro
2013-09-01 0:13 ` Al Viro
2013-09-01 17:48 ` Al Viro
2013-09-09 8:30 ` Peter Zijlstra
2013-08-30 21:10 ` Waiman Long
2013-08-30 21:22 ` Linus Torvalds
2013-08-30 21:30 ` Al Viro
2013-08-30 21:42 ` Waiman Long
2013-08-30 19:40 ` Al Viro
2013-08-30 19:52 ` Waiman Long
2013-08-30 20:26 ` Al Viro
2013-08-30 20:35 ` Waiman Long
2013-08-30 20:48 ` Al Viro
2013-08-31 2:02 ` Waiman Long
2013-08-31 2:35 ` Al Viro
2013-08-31 2:42 ` Al Viro
2013-09-02 19:25 ` Waiman Long
2013-09-03 6:01 ` Ingo Molnar
2013-09-03 7:24 ` Sedat Dilek
2013-09-03 15:38 ` Linus Torvalds
2013-09-03 15:14 ` Waiman Long
2013-09-03 15:34 ` Linus Torvalds
2013-09-03 19:09 ` Linus Torvalds
2013-09-03 21:01 ` Waiman Long
2013-09-04 14:52 ` Waiman Long
2013-09-04 15:14 ` Linus Torvalds
2013-09-04 19:25 ` Waiman Long
2013-09-04 21:34 ` Linus Torvalds
2013-09-05 2:35 ` Waiman Long
2013-09-05 13:31 ` Ingo Molnar
2013-09-05 17:33 ` Waiman Long
2013-09-05 17:40 ` Ingo Molnar
2013-09-03 22:41 ` Sedat Dilek
2013-09-03 23:11 ` Sedat Dilek
2013-09-08 21:45 ` Linus Torvalds
2013-09-09 0:03 ` Al Viro
2013-09-09 0:25 ` Linus Torvalds
2013-09-09 0:35 ` Al Viro
2013-09-09 0:38 ` Linus Torvalds
2013-09-09 0:57 ` Al Viro
2013-09-09 2:09 ` Ramkumar Ramachandra
2013-09-09 0:30 ` Al Viro
2013-09-09 3:32 ` Linus Torvalds
2013-09-09 4:06 ` Ramkumar Ramachandra
2013-09-09 5:44 ` Al Viro
2013-08-30 17:17 ` Peter Zijlstra
2013-08-30 17:28 ` Linus Torvalds
2013-08-30 17:33 ` Linus Torvalds
2013-08-29 15:20 ` Waiman Long
2013-08-06 3:12 ` [PATCH v7 2/4] spinlock: Enable x86 architecture to do lockless refcount update Waiman Long
2013-08-06 3:12 ` [PATCH v7 3/4] dcache: replace d_lock/d_count by d_lockcnt Waiman Long
2013-08-06 3:12 ` [PATCH v7 4/4] dcache: Enable lockless update of dentry's refcount Waiman Long
2013-08-13 18:03 ` [PATCH v7 0/4] Lockless update of reference count protected by spinlock Waiman Long
2013-08-31 3:06 [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount George Spelvin
2013-08-31 17:16 ` Linus Torvalds
2013-09-01 8:50 ` George Spelvin
2013-09-01 11:10 ` Theodore Ts'o
2013-09-01 15:49 ` Linus Torvalds
2013-09-01 18:11 ` Steven Rostedt
2013-09-01 20:03 ` Linus Torvalds
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=CA+icZUWPUDorK+9KRD-H3FpbDeC_7LMatzrYk35jZk13vNuLBQ@mail.gmail.com \
--to=sedat.dilek@gmail.com \
--cc=andi@firstfloor.org \
--cc=aswin@hp.com \
--cc=benh@kernel.crashing.org \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=mszeredi@suse.cz \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=scott.norton@hp.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=waiman.long@hp.com \
/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;
as well as URLs for NNTP newsgroup(s).