From: Mark Hemment <markhe@veritas.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Q: explicit alignment control for the slab allocator
Date: Thu, 1 Mar 2001 18:09:07 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.21.0103011800460.11260-100000@alloc> (raw)
In-Reply-To: <3A9E8628.7CCD1162@colorfullife.com>
On Thu, 1 Mar 2001, Manfred Spraul wrote:
> Alan added a CONFIG options for FORCED_DEBUG slab debugging, but there
> is one minor problem with FORCED_DEBUG: FORCED_DEBUG disables
> HW_CACHEALIGN, and several drivers assume that HW_CACHEALIGN implies a
> certain alignment (iirc usb/uhci.c assumes 16-byte alignment)
>
> I've attached a patch that fixes the explicit alignment control in
> kmem_cache_create().
>
> The parameter 'offset' [the minimum offset to be used for cache
> coloring] actually is the guaranteed alignment, except that the
> implementation was broken. I've fixed the implementation and renamed
> 'offset' to 'align'.
As the original author of the slab allocator, I can assure you there is
nothing guaranteed about "offset". Neither is it to do with any minimum.
The original idea behind offset was for objects with a "hot" area
greater than a single L1 cache line. By using offset correctly (and to my
knowledge it has never been used anywhere in the Linux kernel), a SLAB
cache creator (caller of kmem_cache_create()) could ask the SLAB for more
than one colour (space/L1 cache lines) offset between objects.
As no one uses the feature it could well be broken, but is that a reason
to change its meaning?
Mark
next prev parent reply other threads:[~2001-03-01 19:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-01 17:26 Manfred Spraul
2001-03-01 18:09 ` Mark Hemment [this message]
2001-03-01 19:55 ` Manfred Spraul
2001-03-01 20:28 ` Mark Hemment
2001-03-01 21:55 ` Manfred Spraul
2001-03-02 10:59 ` Mark Hemment
2001-03-02 11:51 ` Manfred Spraul
2001-03-02 12:39 ` Mark Hemment
2001-03-02 13:22 ` Manfred Spraul
2001-03-07 20:02 ` Jes Sorensen
2001-03-07 20:32 ` Manfred Spraul
2001-03-08 17:30 ` Jes Sorensen
2001-03-01 19:22 ` David S. Miller
2001-03-01 19:47 ` Manfred Spraul
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.21.0103011800460.11260-100000@alloc \
--to=markhe@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
/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®