From: Valdis.Kletnieks@vt.edu
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Uninline kcalloc()
Date: Mon, 24 Sep 2007 03:24:12 -0400 [thread overview]
Message-ID: <3721.1190618652@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Mon, 24 Sep 2007 08:22:31 +0200." <Pine.LNX.4.64.0709240821340.23305@fbirervta.pbzchgretzou.qr>
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
On Mon, 24 Sep 2007 08:22:31 +0200, Jan Engelhardt said:
>
> On Sep 24 2007 01:35, Valdis.Kletnieks@vt.edu wrote:
> >On Sun, 23 Sep 2007 00:03:49 +0400, Alexey Dobriyan said:
> >
> >> -static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
> >> -{
> >> - if (n != 0 && size > ULONG_MAX / n)
> >> - return NULL;
> >> - return __kmalloc(n * size, flags | __GFP_ZERO);
> >> -}
> >> +void *kcalloc(size_t n, size_t size, gfp_t flags);
> >
> >NAK.
> >
> >This busticates some pretty subtle code in mm/slab.c that uses
> >uses __builtin_return_address() for debugging - if you do this, then
> >the "calling function" gets listed as "kcalloc()" rather than the much more
> >useful "function that called kcalloc()" (which is what you care about).
> >
> >(I remember going around and around multiple times getting those stupid
> >inlines set up right, so that feature actually did something useful, otherwise
> >kcalloc and kzalloc didn't report where they were called from).
>
> Since 'inline' is only a hint , should not it be __always_inline,
> so that __builtin_return_address() always works?
At the time I was trying to fix that, saying "inline" actually forced it
to be so. Probably need to go re-check that, since there's been about
forty-leven different "tweak the semantics of inline" since then....
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
next prev parent reply other threads:[~2007-09-24 7:24 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 [this message]
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
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=3721.1190618652@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=jengelh@computergmbh.de \
--cc=linux-kernel@vger.kernel.org \
/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®