From: Andi Kleen <ak@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Save some bytes in mm_struct by filling holes on 64bit
Date: Wed, 12 Mar 2008 19:38:05 +0100 [thread overview]
Message-ID: <200803121938.05497.ak@suse.de> (raw)
In-Reply-To: <20080312110537.3f812130.akpm@linux-foundation.org>
> The current ioctx_list_lock position is better from a cache layout POV?
Hmm ok you're right perhaps it's better to move core_waiters up
instead. Updated patch
Save some bytes in mm_struct by filling holes v2
Putting int values together for better packing on 64bit
shrinks sizeof(struct mm_struct) from 776 bytes to 760 bytes.
Signed-off-by: Andi Kleen <ak@suse.de>
Index: linux-2.6.25-rc5/include/linux/mm_types.h
===================================================================
--- linux-2.6.25-rc5.orig/include/linux/mm_types.h
+++ linux-2.6.25-rc5/include/linux/mm_types.h
@@ -172,6 +172,7 @@ struct mm_struct {
atomic_t mm_users; /* How many users with user space? */
atomic_t mm_count; /* How many references to "struct mm_struct" (users
count as 1) */
int map_count; /* number of VMAs */
+ int core_waiters;
struct rw_semaphore mmap_sem;
spinlock_t page_table_lock; /* Protects page tables and some counters */
@@ -216,11 +217,10 @@ struct mm_struct {
unsigned long flags; /* Must use atomic bitops to access the bits */
/* coredumping support */
- int core_waiters;
struct completion *core_startup_done, core_done;
/* aio bits */
- rwlock_t ioctx_list_lock;
+ rwlock_t ioctx_list_lock; /* aio lock */
struct kioctx *ioctx_list;
#ifdef CONFIG_CGROUP_MEM_RES_CTLR
struct mem_cgroup *mem_cgroup;
next prev parent reply other threads:[~2008-03-12 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 14:28 [PATCH] Save some bytes in mm_struct by filling holes on 64bit Andi Kleen
2008-03-12 18:05 ` Andrew Morton
2008-03-12 18:38 ` Andi Kleen [this message]
2008-03-13 16:40 ` Lennart Sorensen
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=200803121938.05497.ak@suse.de \
--to=ak@suse.de \
--cc=akpm@linux-foundation.org \
--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