lkml.org 
[lkml]   [2012]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 19/29] memcg: infrastructure to match an allocation to the right cache
On Tue 06-11-12 09:03:54, Michal Hocko wrote:
> On Mon 05-11-12 16:28:37, Andrew Morton wrote:
> > On Thu, 1 Nov 2012 16:07:35 +0400
> > Glauber Costa <glommer@parallels.com> wrote:
> >
> > > +static __always_inline struct kmem_cache *
> > > +memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp)
> >
> > I still don't understand why this code uses __always_inline so much.
>
> AFAIU, __always_inline (resp. __attribute__((always_inline))) is the
> same thing as inline if optimizations are enabled
> (http://ohse.de/uwe/articles/gcc-attributes.html#func-always_inline).

And this doesn't tell the whole story because there is -fearly-inlining
which enabled by default and it makes a difference when optimizations
are enabled so __always_inline really enforces inlining.

--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2012-11-08 12:41    [W:0.123 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site