public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sf.net>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: akpm@digeo.com
Subject: [patch] shrink thread_struct
Date: 17 Jul 2003 19:49:33 -0400	[thread overview]
Message-ID: <1058485773.733.32.camel@cube> (raw)

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  {							\




                 reply	other threads:[~2003-07-17 23:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1058485773.733.32.camel@cube \
    --to=albert@users.sf.net \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox