On Mon, 20 Mar 2006 10:44:00 PST, David Lang said: > On Mon, 20 Mar 2006, Pekka Enberg wrote: > > On Mon, Mar 20, 2006 at 03:45:23PM +0100, Oliver Neukum wrote: > >>> static inline void *kcalloc(size_t n, size_t size, gfp_t flags) > > On 3/20/06, Benjamin LaHaise <[email protected]> wrote: > >> This function shouldn't be inlined. We have no need to optimize the > >> unlikely case like this. > > > > IIRC, I made it static inline in the first place because that actually > > reduced kernel text size. (And I think it was Adrian who made me do it > > :-). > > I wonder if this is still needed with the new inline changes that were > made to allow GCC to make the decision (for recent GCC's) One non-obvious reason to inline it (at least in -mm kernels) is because the slab leak detector stuff wants to find where it was called from - and if you don't inline kcalloc(), you end up with the kzalloc() call it makes showing kcalloc() as the caller. If you inline it, you end up showing the caller of kcalloc() instead, which is far more useful.....
Attachment:
pgpwfiz40gsvj.pgp
Description: PGP signature
- References:
- Re: [PATCH]micro optimization of kcalloc
- From: Benjamin LaHaise <[email protected]>
- Re: [PATCH]micro optimization of kcalloc
- From: "Pekka Enberg" <[email protected]>
- Re: [PATCH]micro optimization of kcalloc
- From: David Lang <[email protected]>
- Re: [PATCH]micro optimization of kcalloc
- Prev by Date: Re: [PATCH][5/8] proc: export mlocked pages info through "/proc/meminfo: Wired"
- Next by Date: Re: [PATCH] 2.6.xx: sata_mv: another critical fix
- Previous by thread: Re: [PATCH]micro optimization of kcalloc
- Next by thread: Re: [PATCH]micro optimization of kcalloc
- Index(es):