Skip to content

Commit

Permalink
x86: cacheline_align tss_struct
Browse files Browse the repository at this point in the history
The manual padding to align on cacheline size only worked in 32 bit
In 64 bit the structure was not aligned and contained wasted space.

use the compiler ____cachline_aligned to save space & properly align
this structure.

x86_64_default size goes from 9136 -> 8960
x86_64_AMD     size goes from 9136 -> 8896

built & running on 2.6.26-rc8.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Richard Kennedy authored and Ingo Molnar committed Jul 4, 2008
1 parent 95c60b0 commit 84e65b0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/asm-x86/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,12 @@ struct tss_struct {
unsigned long io_bitmap_max;
struct thread_struct *io_bitmap_owner;

/*
* Pad the TSS to be cacheline-aligned (size is 0x100):
*/
unsigned long __cacheline_filler[35];
/*
* .. and then another 0x100 bytes for the emergency kernel stack:
*/
unsigned long stack[64];

} __attribute__((packed));
} ____cacheline_aligned;

DECLARE_PER_CPU(struct tss_struct, init_tss);

Expand Down

0 comments on commit 84e65b0

Please sign in to comment.