From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SLUB: Add Kconfig option for SLAB quirks
Date: Fri, 6 Apr 2007 13:26:34 -0700 [thread overview]
Message-ID: <20070406132634.1f64d4a1.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0704061227170.11797@schroedinger.engr.sgi.com>
On Fri, 6 Apr 2007 12:53:22 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:
> This patch may allow to reduce the churn for SLUB. It adds a Kconfig
> option that makes SLUB replicate SLAB special handling for slab caches.
>
> ...
>
> Index: linux-2.6.21-rc5-mm4/init/Kconfig
> ===================================================================
> --- linux-2.6.21-rc5-mm4.orig/init/Kconfig 2007-04-06 12:12:59.000000000 -0700
> +++ linux-2.6.21-rc5-mm4/init/Kconfig 2007-04-06 12:21:44.000000000 -0700
> @@ -569,6 +569,32 @@ config SLUB
> of queues of objects. SLUB can use memory efficiently
> way and has enhanced diagnostics.
>
> +config SLUB_SLAB_QUIRKS
> + depends on SLUB
> + bool "SLUB: Handle SLAB quirks"
> + help
> + Make SLUB emulate various inconsistent behaviors of SLAB in order
> + to avoid having to fix these issues. Switching this on will make
> + debugging on some slabs impossible and may lead to a slight
> + performance degradation (one additional check in the hotpath).
> +
> + The issues addressed are
> + 1. Page order slabs are always aligned on page boundaries
> + regardless of other alignment requirements. This also
> + affects the kmalloc array. Kmalloc slabs are usually aligned
> + to KMALLOC_MINALIGN. Now we make an exception for those of
> + page order. Debugging options are disabled if they would
> + misalign a cache.
> +
> + 2. Page order slabs are handled in such a way that page->index
> + can be used for other purposes.
> +
> + 3. PAGE_SIZE slabs are never increased beyond PAGE_SIZE.
> + Debugging is switched off in order to guarantee that.
> + This allows the use of page->private for other purposes.
> + All slab allocators use compound pages for higher order
> + allocations which would no longer allow the use of page->private.
urgh. It would be better to continue to rework slab/slub callers in the
fashion which you have been doing, don't you think?
Rephrasing my earlier point: are we doing things in the correct order here,
and efficiently? It is not settled in my mind whether we want to merge
slub _at all_. Do we have enough information yet to be able to make that
decision?
And if that information indicates that a slub merge _is_ justified, why is
the chosen approach superior to the incremental one: if slab code is grotty
(it is), clean it up. If slab has unnecessary stuff, delete it.
next prev parent reply other threads:[~2007-04-06 20:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-06 19:53 Christoph Lameter
2007-04-06 20:26 ` Andrew Morton [this message]
2007-04-06 20:31 ` 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=20070406132634.1f64d4a1.akpm@linux-foundation.org \
--to=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
all inboxes | Powered by JetHome®