lkml.org 
[lkml]   [2008]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] Save some bytes in mm_struct by filling holes on 64bit
Date

> 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;

\
 
 \ /
  Last update: 2008-03-12 19:39    [W:0.053 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site