[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080722210751.GA14810@localhost>
Date: Wed, 23 Jul 2008 00:07:52 +0300
From: Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
To: Matt Mackall <mpm@...enic.com>
Cc: penberg@...helsinki.fi, cl@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
rdunlap@...otime.net
Subject: Re: [RFC PATCH 4/4] kmemtrace: SLOB hooks.
On Tue, Jul 22, 2008 at 03:53:55PM -0500, Matt Mackall wrote:
>
> On Tue, 2008-07-22 at 21:36 +0300, Eduard - Gabriel Munteanu wrote:
> > -static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags)
> > +static __always_inline void *kmem_cache_alloc(struct kmem_cache *cachep,
> > + gfp_t flags)
> > {
> > return kmem_cache_alloc_node(cachep, flags, -1);
> > }
>
> Why is this needed? builtin_return?
If we don't use __always_inline, we can't be sure whether it's inlined
or not. And we don't know if we need _THIS_IP_ or _RET_IP_ (equivalent
to __builtin_return_address(0)). Simple, plain 'inline' does not
guarantee GCC will inline that function, nor does it warn us if it is
not inlined.
--
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