mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] timer_list: remove alignment padding on 64 bit when CONFIG_TIMER_STATS
@ 2010-07-26  8:54 Richard Kennedy
  0 siblings, 0 replies; only message in thread
From: Richard Kennedy @ 2010-07-26  8:54 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Andrew Morton, lkml

Re-order structure timer_list to remove 8 bytes of alignment padding on
64 bit builds when CONFIG_TIMER_STATS is selected.
    
timer_list is widely used across the kernel so many structures will
benefit and shrink in size.

For example, with my config on x86_64
	per_cpu_dm_data shrinks from 136 to 128 bytes
and
	ahci_port_priv shrinks from 1032 to 968 bytes.


Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>

---
patch against v2.6.35-rc6
compiled & tested on x86_64

regards
Richard


diff --git a/include/linux/timer.h b/include/linux/timer.h
index ea965b8..14a6fd4 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -24,9 +24,9 @@ struct timer_list {
 	int slack;
 
 #ifdef CONFIG_TIMER_STATS
+	int start_pid;
 	void *start_site;
 	char start_comm[16];
-	int start_pid;
 #endif
 #ifdef CONFIG_LOCKDEP
 	struct lockdep_map lockdep_map;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-26  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-26  8:54 [PATCH] timer_list: remove alignment padding on 64 bit when CONFIG_TIMER_STATS Richard Kennedy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®