linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: daniel.santos@pobox.com, Daniel Santos <danielfsantos@att.net>,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: mm/slab.c: remove effectively dead code from kmem_cache_create
Date: Fri, 10 Feb 2012 15:06:41 +0200	[thread overview]
Message-ID: <1328879201.13624.52.camel@jaguar> (raw)
In-Reply-To: <20120209143924.886e0ff6.akpm@linux-foundation.org>

On Thu, 2012-02-09 at 14:39 -0800, Andrew Morton wrote:
> kmem_cache_create() is called extremely rarely, so the performance
> benefit here is negligible.
> 
> We could presumably avoid two of those ifdefs by defining SLAB_RED_ZONE
> and SLAB_STORE_USER to be zero if !defined(DEBUG).  Personally I think
> that's a bit too subtle and would prefer the explicit ifdefs.
> 
> In my x86_64 allnoconfig build the patch reduces slab.o's text size
> from 12859 bytes to 12812.  I'll let Pekka decide if that's worth it ;)

The text savings are worth it but I'd really prefer to see
include/linux/slab.h patched to define debugging flags as zero for
non-CONFIG_SLAB_DEBUG and let GCC eliminate the dead code for us.

			Pekka


  reply	other threads:[~2012-02-10 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09  4:16 mm/slab.c: remove effectively dead code from kmem_cache_create Daniel Santos
2012-02-09 22:39 ` Andrew Morton
2012-02-10 13:06   ` Pekka Enberg [this message]
2012-02-10 19:58     ` Daniel Santos

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=1328879201.13624.52.camel@jaguar \
    --to=penberg@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.santos@pobox.com \
    --cc=danielfsantos@att.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).