[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110609141714.GA2285@linux.vnet.ibm.com>
Date: Thu, 9 Jun 2011 07:17:14 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Josh Triplett <josh@...htriplett.org>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
dipankar@...ibm.com, akpm@...ux-foundation.org,
mathieu.desnoyers@...ymtl.ca, niv@...ibm.com, tglx@...utronix.de,
peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
patches@...aro.org
Subject: Re: [PATCH tip/core/rcu 03/28] rcu: Streamline code produced by
__rcu_read_unlock()
On Wed, Jun 08, 2011 at 08:45:07PM -0700, Josh Triplett wrote:
> On Wed, Jun 08, 2011 at 12:29:42PM -0700, Paul E. McKenney wrote:
> > Given some common flag combinations, particularly -Os, gcc will inline
> > rcu_read_unlock_special() despite its being in an unlikely() clause.
> > Use noline to prohibit this misoptimization.
>
> If rcu_read_unlock_special only gets called in the one place, why does
> it hurt to inline it, as long as the inlined code stays on the cold
> path? Might as well remove the overhead of the function call.
One problem with inlining rcu_read_unlock_special() is that it
increases the icache footprint on the fast path. Because the call to
rcu_read_unlock_special() occurs only rarely (if the reader blocked
or took too long), it is better to take the overhead of the call in
the uncommon case than to take the additional cache-miss overhead
in the common case.
Or did I miss your point?
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists