mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: David Lang <dlang@digitalinsight.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
	Benjamin LaHaise <bcrl@kvack.org>,
	Oliver Neukum <neukum@fachschaft.cup.uni-muenchen.de>,
	linux-kernel@vger.kernel.org, Adrian Bunk <bunk@stusta.de>
Subject: Re: [PATCH]micro optimization of kcalloc
Date: Wed, 22 Mar 2006 00:40:45 -0500	[thread overview]
Message-ID: <200603220540.k2M5ej65018396@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Mon, 20 Mar 2006 10:44:00 PST." <Pine.LNX.4.62.0603201043060.17740@qynat.qvtvafvgr.pbz>

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

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 <bcrl@kvack.org> 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 #2: Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2006-03-22  5:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-20 14:45 Oliver Neukum
2006-03-20 15:14 ` Benjamin LaHaise
2006-03-20 15:33   ` Oliver Neukum
2006-03-20 15:32     ` Benjamin LaHaise
2006-03-20 16:15   ` Pekka Enberg
2006-03-20 18:44     ` David Lang
2006-03-22  5:40       ` Valdis.Kletnieks [this message]
2006-03-20 15:37 ` Pekka Enberg
2006-03-20 15:51 ` Pekka Enberg
  -- strict thread matches above, loose matches on Subject: below --
2006-03-20 13:08 Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200603220540.k2M5ej65018396@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=bcrl@kvack.org \
    --cc=bunk@stusta.de \
    --cc=dlang@digitalinsight.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neukum@fachschaft.cup.uni-muenchen.de \
    --cc=penberg@cs.helsinki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®