From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] RCU changes for v3.4
Date: Fri, 23 Mar 2012 14:25:50 -0700 [thread overview]
Message-ID: <20120323212550.GA11791@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120323211638.GA2450@linux.vnet.ibm.com>
On Fri, Mar 23, 2012 at 02:16:38PM -0700, Paul E. McKenney wrote:
> On Fri, Mar 23, 2012 at 12:39:59PM -0700, Linus Torvalds wrote:
> > On Fri, Mar 23, 2012 at 12:21 PM, Paul E. McKenney
> > <paulmck@linux.vnet.ibm.com> wrote:
> > >>
> > >> Please? Every time I look at some profiles, that silly rcu_read_lock
> > >> is there in the profile. It's annoying. I'd rather see it in the
> > >> function that invokes it.
> > >
> > > Let me see what I can do...
> >
> > Thanks. To some degree, rcu_read_lock() is the more critical one,
> > because it is often in the much more critical path in the caller. In
> > particular, it's often at the beginning of a function, where a number
> > of arguments are "live", and calling it out-of-line also forces the
> > compiler to then save/restore those arguments (because they are
> > clobbered by the function call).
> >
> > rcu_read_unlock() is *usually* not as critical, and is obviously much
> > harder to inline anyway due to the whole complexity with needing to
> > check if an RCU sequence has ended. It often is at the end of the
> > function call in the caller, when the only thing like is often just
> > the single return value (if that). So it seldom looks nearly as bad in
> > any profiles, because it doesn't tend to have the same kind of bad
> > impact on the call site.
>
> Very good to hear! Especially since I am not seeing how to move
> ->rcu_read_unlock_special to a per-CPU variable given that rcu_boost()
> needs cross-task access to it. There is probably some obvious trick,
> but I will start with just __rcu_read_lock() for now.
And one obvious trick is a per-CPU pointer to the task-structure variable.
But __rcu_read_lock() first.
Thanx, Paul
next prev parent reply other threads:[~2012-03-23 21:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 15:23 [GIT PULL] RCU changes for v3.4 Ingo Molnar
2012-03-20 0:18 ` Linus Torvalds
2012-03-20 3:33 ` Paul E. McKenney
2012-03-20 6:13 ` Ingo Molnar
2012-03-23 1:08 ` Linus Torvalds
2012-03-23 19:21 ` Paul E. McKenney
2012-03-23 19:39 ` Linus Torvalds
2012-03-23 21:16 ` Paul E. McKenney
2012-03-23 21:25 ` Paul E. McKenney [this message]
2012-03-24 1:47 ` Paul E. McKenney
2012-03-24 2:00 ` Linus Torvalds
2012-03-24 4:17 ` Paul E. McKenney
2012-03-24 4:25 ` Linus Torvalds
2012-03-24 4:48 ` Paul E. McKenney
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=20120323212550.GA11791@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox