Re: [PATCH v6 19/29] memcg: infrastructure to match an allocation to the right cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 08-11-12 12:05:13, Michal Hocko wrote:
> 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@xxxxxxxxxxxxx> 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.

and -fearly-inlining is another doc trap. I have tried with -O2
-fno-early-inlining and __always_inline code has been inlined with gcc
4.3 and 4.7 while simple inline is ignored so it really seems that
__always_inline is always inlined but man page is little a bit mean to
tell us all the details.

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]