[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080312110537.3f812130.akpm@linux-foundation.org>
Date: Wed, 12 Mar 2008 11:05:37 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Andi Kleen <ak@...e.de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Save some bytes in mm_struct by filling holes on 64bit
On Wed, 12 Mar 2008 15:28:07 +0100 Andi Kleen <ak@...e.de> wrote:
>
> Save some bytes in mm_struct by filling holes
>
> 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@...e.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 */
> + rwlock_t ioctx_list_lock; /* aio lock */
> struct rw_semaphore mmap_sem;
> spinlock_t page_table_lock; /* Protects page tables and some counters */
>
> @@ -213,14 +214,13 @@ struct mm_struct {
> unsigned int token_priority;
> unsigned int last_interval;
>
> + int core_waiters;
> 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;
> struct kioctx *ioctx_list;
> #ifdef CONFIG_CGROUP_MEM_RES_CTLR
> struct mem_cgroup *mem_cgroup;
The current ioctx_list_lock position is better from a cache layout POV?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists