The thread_struct was bloated due to padding.
I kept the alignment and may have improved the
cache behavior even, with the FPU stuff now
generally starting on a cache line.
(found with -Wpadded)
diff -Naurd old/include/asm-i386/processor.h new/include/asm-i386/processor.h
--- old/include/asm-i386/processor.h 2003-06-26 17:50:47.000000000 -0400
+++ new/include/asm-i386/processor.h 2003-07-17 18:10:33.000000000 -0400
@@ -335,9 +335,9 @@
long foo;
long fos;
long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */
- unsigned char ftop, changed, lookahead, no_update, rm, alimit;
struct info *info;
unsigned long entry_eip;
+ unsigned char ftop, changed, lookahead, no_update, rm, alimit;
};
union i387_union {
@@ -393,19 +393,20 @@
unsigned long esp;
unsigned long fs;
unsigned long gs;
+/* IO permissions */
+ unsigned long *ts_io_bitmap;
/* Hardware debugging registers */
unsigned long debugreg[8]; /* %%db0-7 debug registers */
/* fault info */
unsigned long cr2, trap_no, error_code;
+/* virtual 86 mode info part #1, to pad (and cache-align) i387_union */
+ unsigned long screen_bitmap;
/* floating point info */
union i387_union i387;
-/* virtual 86 mode info */
+/* virtual 86 mode info part #2 */
struct vm86_struct __user * vm86_info;
- unsigned long screen_bitmap;
unsigned long v86flags, v86mask, saved_esp0;
unsigned int saved_fs, saved_gs;
-/* IO permissions */
- unsigned long *ts_io_bitmap;
};
#define INIT_THREAD { \