From: Richard Kennedy <richard@rsk.demon.co.uk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm <linux-mm@kvack.org>,
lkml <linux-kernel@vger.kernel.org>,
Rik van Riel <riel@redhat.com>
Subject: [PATCH] mm: remove alignment padding from anon_vma on (some) 64 bit builds
Date: Sat, 28 Aug 2010 15:09:46 +0100 [thread overview]
Message-ID: <1283004586.1912.10.camel@castor.rsk> (raw)
Reorder structure anon_vma to remove alignment padding on 64 builds when
(CONFIG_KSM || CONFIG_MIGRATION).
This will shrink the size of the anon_vma structure from 40 to 32 bytes
& allow more objects per slab in its kmem_cache.
Under slub the objects in the anon_vma kmem_cache will then be 40 bytes
with 102 objects per slab.
(On v2.6.36 without this patch,the size is 48 bytes and 85
objects/slab.)
compiled & tested on x86_64 using SLUB
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
---
patch against v2.6.36-rc2
compiled & tested on x86_64 AMD X2
regards
Richard
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 31b2fd7..5c98df6 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -25,8 +25,8 @@
* pointing to this anon_vma once its vma list is empty.
*/
struct anon_vma {
- spinlock_t lock; /* Serialize access to vma list */
struct anon_vma *root; /* Root of this anon_vma tree */
+ spinlock_t lock; /* Serialize access to vma list */
#if defined(CONFIG_KSM) || defined(CONFIG_MIGRATION)
/*
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2010-08-28 14:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-28 14:09 Richard Kennedy [this message]
2010-08-28 15:57 ` Rik van Riel
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=1283004586.1912.10.camel@castor.rsk \
--to=richard@rsk.demon.co.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.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