public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, clameter@sgi.com
Subject: Re: + fix-spellings-of-slab-allocator-section-in-init-kconfig.patch added to -mm tree
Date: Tue, 8 May 2007 19:23:08 -0500	[thread overview]
Message-ID: <20070509002307.GV11115@waste.org> (raw)
In-Reply-To: <200705082302.l48N2KrZ004229@shell0.pdx.osdl.net>

On Tue, May 08, 2007 at 04:02:20PM -0700, akpm@linux-foundation.org wrote:
>  	bool "SLOB (Simple Allocator)"
>  	help
>  	   SLOB replaces the SLAB allocator with a drastically simpler
>  	   allocator.  SLOB is more space efficient that SLAB but does not
> -	   scale well (single lock for all operations) and is more susceptible
> -	   to fragmentation. SLOB it is a great choice to reduce
> -	   memory usage and code size for embedded systems.
> +	   scale well (single lock for all operations) and is also highly
> +	   susceptible to fragmentation. SLUB can accomplish a higher object
> +	   density. It is usually better to use SLUB instead of SLOB.

This isn't accurate.

First, SLOB no longer runs on SMP because SLAB grew some RCU-related
hair. So it now effectively has no locks at all! 

Second, I think the fragmentation issues are exaggerated. Before SLAB
was introduced, Linux's kmalloc was the moral equivalent of SLOB
(without SLAB emulation) and fragmentation was not the driving force
for replacement. Small Linux 1.x machines frequently had uptimes of 1+
years without fragmenting to death. Instead, it was performance with
large amounts of RAM - the old kmalloc (and SLOB) have performance
proportional to memory size.

Third, I don't think it's possible even in theory for a SLAB-like
allocator to be as efficient as SLOB simply due to the constraints of
putting only objects of the same size on a given page. So consider me
skeptical on the density claim.

It is usually better to use SLUB simply because you're more likely to
have 1GB of RAM rather than 4MB.

-- 
Mathematics is the supreme nostalgia of our time.

       reply	other threads:[~2007-05-09  0:23 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 [this message]
2007-05-09  0:32   ` + fix-spellings-of-slab-allocator-section-in-init-kconfig.patch added to -mm tree 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

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=20070509002307.GV11115@waste.org \
    --to=mpm@selenic.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --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