From: Andrea Arcangeli <andrea@suse.de>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Andrew Morton <akpm@osdl.org>,
Andreas Gruenbacher <agruen@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: slab-alignment-rework.patch in -mc
Date: Tue, 20 Apr 2004 02:26:02 +0200 [thread overview]
Message-ID: <20040420002602.GY29954@dualathlon.random> (raw)
In-Reply-To: <4084017C.5080706@colorfullife.com>
On Mon, Apr 19, 2004 at 06:42:36PM +0200, Manfred Spraul wrote:
> Then pass "4" as the align parameter to kmem_cache_create. That's the
> main point of the patch: it's now possible to explicitely specify the
> requested alignment. 32 for the 3rd level page tables, the optimal
> number for the pte_chains, etc.
>
> >No best-guess must
> >be made automatically by the slab code, rounding it to 16 bytes.
> >
> If you pass 0 as align to kmem_cache_create, then it's rounded to L2
> size. It's questionable if that's really the best thing - on
> uniprocessor, 16-byte might result is better performance - there is no
> risk of false sharing.
my point is that 0 as align must not round to l2 size or you break
stuff. you likely have broken the vma alignment to make the most obvious
example because I don't think it's a l1 cache multiple.
Removing the HW_ALIGN bitflag isn't nearly enough to avoid breaking
stuff after your changes to the kmem_cache_create API, to avoid breaking
stuff you need to change _all_ other kmem_cache_create and replace 0
with 4 if they didn't have the HW_ALIGN parameter, you didn't do that
and things breaks, not just for small objects, but for the ones bigger
than the cachesize too.
If you fixup all other kmem_cache_create callers to pass 4 instead of 0
that could be fine with me, but I still think this removal of the
HW_ALIGN bitflag is completely worthless, you still have a branch
checking !align, so you don't seem to gain anything and you break stuff.
Note: I really appreciate the runtime evaluation of the cachesize, those
parts are fine, changing offset to "align" is also more than welcome,
only the removal of HW_ALIGN bitflag w/o s/0/4/ where HW_ALIGN was
missing is bogus and breaks stuff.
next prev parent reply other threads:[~2004-04-20 0:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1082383751.6746.33.camel@f235.suse.de>
2004-04-19 16:25 ` Andrea Arcangeli
2004-04-19 16:42 ` Manfred Spraul
2004-04-20 0:26 ` Andrea Arcangeli [this message]
2004-04-20 7:24 ` Andrew Morton
2004-04-20 14:49 ` Andrea Arcangeli
2004-04-20 17:23 ` Manfred Spraul
2004-04-20 18:25 ` Andrew Morton
2004-04-20 18:52 ` Linus Torvalds
2004-04-21 17:22 ` Manfred Spraul
2004-04-21 21:46 ` Andrew Morton
2004-04-20 18:53 ` Arjan van de Ven
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=20040420002602.GY29954@dualathlon.random \
--to=andrea@suse.de \
--cc=agruen@suse.de \
--cc=akpm@osdl.org \
--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®