diff options
author | Richard Kennedy <richard@rsk.demon.co.uk> | 2011-05-24 09:49:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-25 10:16:41 -0400 |
commit | af6a25f0e1ec0265c267e6ee4513925eaba6d0ed (patch) | |
tree | 00b34efeb9fe46264bd6297134c733c61bfe047d /arch | |
parent | f073cc8f39b48fdf4c8cd9520a6028fe69199b60 (diff) |
x86: Reorder mm_context_t to remove x86_64 alignment padding and thus shrink mm_struct
Reorder mm_context_t to remove alignment padding on 64 bit
builds shrinking its size from 64 to 56 bytes.
This allows mm_struct to shrink from 840 to 832 bytes, so using
one fewer cache lines, and getting more objects per slab when
using slub.
slabinfo mm_struct reports
before :-
Sizes (bytes) Slabs
-----------------------------------
Object : 840 Total : 7
SlabObj: 896 Full : 1
SlabSiz: 16384 Partial: 4
Loss : 56 CpuSlab: 2
Align : 64 Objects: 18
after :-
Sizes (bytes) Slabs
----------------------------------
Object : 832 Total : 7
SlabObj: 832 Full : 1
SlabSiz: 16384 Partial: 4
Loss : 0 CpuSlab: 2
Align : 64 Objects: 19
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Cc: wilsons@start.ca
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Pekka Enberg <penberg@kernel.org>
Link: http://lkml.kernel.org/r/1306244999.1999.5.camel@castor.rsk
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/mmu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h index aeff3e89b222..5f55e6962769 100644 --- a/arch/x86/include/asm/mmu.h +++ b/arch/x86/include/asm/mmu.h | |||
@@ -11,14 +11,14 @@ | |||
11 | typedef struct { | 11 | typedef struct { |
12 | void *ldt; | 12 | void *ldt; |
13 | int size; | 13 | int size; |
14 | struct mutex lock; | ||
15 | void *vdso; | ||
16 | 14 | ||
17 | #ifdef CONFIG_X86_64 | 15 | #ifdef CONFIG_X86_64 |
18 | /* True if mm supports a task running in 32 bit compatibility mode. */ | 16 | /* True if mm supports a task running in 32 bit compatibility mode. */ |
19 | unsigned short ia32_compat; | 17 | unsigned short ia32_compat; |
20 | #endif | 18 | #endif |
21 | 19 | ||
20 | struct mutex lock; | ||
21 | void *vdso; | ||
22 | } mm_context_t; | 22 | } mm_context_t; |
23 | 23 | ||
24 | #ifdef CONFIG_SMP | 24 | #ifdef CONFIG_SMP |