mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Matt Mackall <mpm@selenic.com>
Cc: akpm@linux-foundation.org, Nick Piggin <nickpiggin@yahoo.com.au>,
	David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org
Subject: Re: + fix-spellings-of-slab-allocator-section-in-init-kconfig.patch added to -mm tree
Date: Tue, 8 May 2007 20:24:41 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0705082021420.22016@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070509031604.GD11115@waste.org>

On Tue, 8 May 2007, Matt Mackall wrote:

> > Exactly. That overhead does not exist in SLUB. Thus SLOB is less efficient 
> > than SLUB.
> 
> What size object does kmalloc(80) return? In SLAB, the answer is 128
> bytes with 48 bytes of slack space. In SLOB, the answer is 88 for 8
> bytes of slack space. Looks like SLUB is in the same camp as SLAB
> here:

There is a 96 sized general slab. So it would go up to that size. But you 
can create a 80 byte slab of course. And that may cost minimal overhead 
since 80 byte slabs may be merged. If one already exist then you get it 
for free.

> +/*
> + * We keep the general caches in an array of slab caches that are used for
> + * 2^x bytes of allocations.
> + */
> +extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
> ..
> +	if (size <=        128) return 7;

96 please. You skipped the first part.

> SLOB's kmalloc overhead is 8 bytes, always. That's 1/8th the average
> SLAB kmalloc overhead.

SLUB can generate an 80 byte slab with minimal overhead if you wanted. But 
yes I agree the flexbility there is an advantage if you have objects of 
various sizes.

      reply	other threads:[~2007-05-09  3:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200705082302.l48N2KrZ004229@shell0.pdx.osdl.net>
2007-05-09  0:23 ` Matt Mackall
2007-05-09  0:32   ` Alan Cox
2007-05-09  0:33     ` Matt Mackall
2007-05-09  0:43       ` Christoph Lameter
2007-05-09  0:51   ` Christoph Lameter
2007-05-09  1:27     ` Matt Mackall
2007-05-09  1:32       ` Christoph Lameter
2007-05-09  1:51         ` David Miller
2007-05-09  1:53           ` Christoph Lameter
2007-05-09  1:55             ` David Miller
2007-05-09  1:57               ` Christoph Lameter
2007-05-09  2:06                 ` David Miller
2007-05-09  2:10                   ` Nick Piggin
2007-05-09  2:20                     ` Christoph Lameter
2007-05-09  2:02           ` Nick Piggin
2007-05-09  2:56             ` Matt Mackall
2007-05-09  3:18               ` Nick Piggin
2007-05-09  3:27                 ` Christoph Lameter
2007-05-09  3:47                 ` Nick Piggin
2007-05-10  0:42             ` Andrew Morton
2007-05-10  1:00               ` Nick Piggin
2007-05-10  2:27                 ` Matt Mackall
2007-05-09  2:19         ` Matt Mackall
2007-05-09  2:24           ` Christoph Lameter
2007-05-09  2:43             ` Nick Piggin
2007-05-09  2:57               ` Christoph Lameter
2007-05-09  3:04                 ` Nick Piggin
2007-05-09  3:08                   ` Christoph Lameter
2007-05-09  3:25                 ` Matt Mackall
2007-05-09  3:16             ` Matt Mackall
2007-05-09  3:24               ` 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.0705082021420.22016@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=nickpiggin@yahoo.com.au \
    /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®