mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Valdis.Kletnieks@vt.edu
Cc: Kyle Moffett <mrmacman_g4@mac.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Uninline kcalloc()
Date: Tue, 25 Sep 2007 14:21:29 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0709251421001.4917@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <5202.1190639853@turing-police.cc.vt.edu>

On Mon, 24 Sep 2007, Valdis.Kletnieks@vt.edu wrote:

> I think I looked at that, and it wasn't as easy as it looked, because there
> were ugly corner cases for what __builtin_return_address() returned depending
> on exactly what did or didn't get inlined. Basically, it's ugly stuff - if you
> try to use __builtin_retur_address inside kcalloc to pass to __kmalloc, and
> then kcalloc gets inlined, you end up passing not the routine you wanted (the
> caller of kcalloc), but the *parent* of that...

Note that this can be done in a clean way in SLUB using slab_alloc() which 
takes a address parameter as obtained from __builtin_return_address().


      reply	other threads:[~2007-09-25 21:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22 20:03 Alexey Dobriyan
2007-09-24  5:35 ` Valdis.Kletnieks
2007-09-24  6:22   ` Jan Engelhardt
2007-09-24  7:24     ` Valdis.Kletnieks
2007-09-24  7:44   ` Alexey Dobriyan
2007-09-24  7:55     ` Valdis.Kletnieks
2007-09-24  8:13     ` Valdis.Kletnieks
2007-09-24 12:59   ` Kyle Moffett
2007-09-24 13:17     ` Valdis.Kletnieks
2007-09-25 21:21       ` Christoph Lameter [this message]

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=Pine.LNX.4.64.0709251421001.4917@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=adobriyan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    /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®