William Cohen
97dc32cdb1
reduce size of task_struct on 64-bit machines
...
This past week I was playing around with that pahole tool
(http://oops.ghostprotocols.net:81/acme/dwarves/ ) and looking at the size
of various struct in the kernel. I was surprised by the size of the
task_struct on x86_64, approaching 4K. I looked through the fields in
task_struct and found that a number of them were declared as "unsigned
long" rather than "unsigned int" despite them appearing okay as 32-bit
sized fields. On x86_64 "unsigned long" ends up being 8 bytes in size and
forces 8 byte alignment. Is there a reason there a reason they are
"unsigned long"?
The patch below drops the size of the struct from 3808 bytes (60 64-byte
cachelines) to 3760 bytes (59 64-byte cachelines). A couple other fields
in the task struct take a signficant amount of space:
struct thread_struct thread; 688
struct held_lock held_locks[30]; 1680
CONFIG_LOCKDEP is turned on in the .config
[akpm@linux-foundation.org: fix printk warnings]
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:58 -07:00
..
2007-04-27 15:44:34 -03:00
2007-05-07 12:34:24 -07:00
2007-05-01 16:11:57 +02:00
2007-04-27 19:16:19 +01:00
2007-05-03 03:34:42 -07:00
2007-04-25 22:28:58 -07:00
2007-04-25 22:25:34 -07:00
2007-05-07 12:12:58 -07:00
2007-04-30 22:17:15 -07:00
2007-04-27 13:28:39 -07:00
2007-04-28 14:40:40 -04:00
2007-04-25 22:25:31 -07:00
2007-04-30 09:08:17 +02:00
2007-04-30 09:01:23 +02:00
2007-05-02 19:27:08 +02:00
2007-05-07 12:12:55 -07:00
2007-05-07 12:12:52 -07:00
2007-05-07 12:12:52 -07:00
2007-05-07 12:13:00 -07:00
2007-05-07 12:13:00 -07:00
2007-05-05 14:55:20 -07:00
2007-05-02 19:27:09 +02:00
2007-05-02 14:38:33 +10:00
2007-04-25 22:28:56 -07:00
2007-04-27 10:57:31 -07:00
2007-05-04 18:04:48 -07:00
2007-05-01 09:11:12 +01:00
2007-05-07 12:12:58 -07:00
2007-05-02 19:27:12 +02:00
2007-05-02 19:27:17 +02:00
2007-05-07 12:13:02 -07:00
2007-05-03 13:17:25 -07:00
2007-05-06 20:38:28 -04:00
2007-04-25 22:28:35 -07:00
2007-05-08 11:14:57 -07:00
2007-04-28 11:01:04 -04:00
2007-05-07 12:12:57 -07:00
2007-05-01 00:39:13 -04:00
2007-04-28 11:01:07 -04:00
2007-05-05 14:55:20 -07:00
2007-05-07 12:12:51 -07:00
2007-05-01 23:26:33 +02:00
2007-05-01 23:26:34 +02:00
2007-05-01 23:26:32 +02:00
2007-05-01 23:26:34 +02:00
2007-04-25 22:25:31 -07:00
2007-04-25 22:25:31 -07:00
2007-05-05 22:03:49 +02:00
2007-05-05 11:43:04 -07:00
2007-04-25 22:23:43 -07:00
2007-04-25 22:25:12 -07:00
2007-04-25 22:28:44 -07:00
2007-04-25 22:30:01 -07:00
2007-04-25 22:29:10 -07:00
2007-04-25 22:29:14 -07:00
2007-04-25 22:28:57 -07:00
2007-04-25 22:24:41 -07:00
2007-04-25 22:26:20 -07:00
2007-04-25 22:25:31 -07:00
2007-04-25 22:29:57 -07:00
2007-04-25 22:29:10 -07:00
2007-05-07 12:12:59 -07:00
2007-04-29 23:42:45 -04:00
2007-05-06 13:21:57 -07:00
2007-05-04 17:59:06 -07:00
2007-04-28 14:15:59 -04:00
2007-04-25 22:25:31 -07:00
2007-04-25 22:25:31 -07:00
2007-04-25 22:25:52 -07:00
2007-04-30 16:40:39 -07:00
2007-05-03 10:52:22 +03:00
2007-05-07 12:13:00 -07:00
2007-04-26 15:46:23 -07:00
2007-05-02 18:57:59 -07:00
2007-04-25 22:29:49 -07:00
2007-05-03 10:52:32 +03:00
2007-04-28 14:51:33 -04:00
2007-05-07 12:12:57 -07:00
2007-05-03 10:52:22 +03:00
2007-05-07 12:12:53 -07:00
2007-05-07 12:12:54 -07:00
2007-05-07 12:12:52 -07:00
2007-05-02 20:58:08 +02:00
2007-05-02 18:57:59 -07:00
2007-05-02 19:02:38 -07:00
2007-04-27 10:57:33 -07:00
2007-04-26 15:48:28 -07:00
2007-05-03 15:13:45 -07:00
2007-05-03 03:36:16 -07:00
2007-04-25 22:27:45 -07:00
2007-05-05 11:42:03 -07:00
2007-04-30 22:17:07 -07:00
2007-04-30 22:17:16 -07:00
2007-04-30 22:17:09 -07:00
2007-04-25 22:29:41 -07:00
2007-05-04 17:59:07 -07:00
2007-05-07 12:12:59 -07:00
2007-05-08 11:14:57 -07:00
2007-05-05 14:15:32 -07:00
2007-05-02 18:57:59 -07:00
2007-05-04 19:36:58 -07:00
2007-05-02 19:02:38 -07:00
2007-05-02 19:27:11 +02:00
2007-04-28 11:01:04 -04:00
2007-04-30 16:40:41 -07:00
2007-05-08 11:14:57 -07:00
2007-05-07 12:12:52 -07:00
2007-05-07 12:12:54 -07:00
2007-05-07 00:34:20 -07:00
2007-04-25 22:27:04 -07:00
2007-04-26 15:48:28 -07:00
2007-05-08 11:14:58 -07:00
2007-04-25 22:25:31 -07:00
2007-04-27 10:44:42 -07:00
2007-05-07 12:12:58 -07:00
2007-05-07 12:12:50 -07:00
2007-05-03 03:16:20 -07:00
2007-05-07 12:12:57 -07:00
2007-05-07 12:12:54 -07:00
2007-04-30 00:58:19 -07:00
2007-04-26 15:48:28 -07:00
2007-04-28 22:06:01 -04:00
2007-05-08 11:14:58 -07:00
2007-04-26 01:54:39 -07:00
2007-05-07 12:12:59 -07:00
2007-04-25 22:28:57 -07:00
2007-04-27 10:57:32 -07:00
2007-04-25 22:25:31 -07:00
2007-05-01 13:04:15 +02:00
2007-04-25 22:25:31 -07:00
2007-05-07 12:12:58 -07:00
2007-04-27 13:28:39 -07:00
2007-04-27 15:43:27 -03:00
2007-04-28 11:01:01 -04:00
2007-04-26 15:45:32 -07:00
2007-04-30 22:17:06 -07:00
2007-05-04 12:55:39 -07:00