2008-08-01 12:36:48

by Richard Kennedy

[permalink] [raw]
Subject: [PATCH] reorder struct prop_local_single to remove padding on 64 bit builds

reorder structure to remove 8 bytes of padding on 64 bit builds

(also removes 8 bytes from task_struct)

Signed-off-by: Richard Kennedy <[email protected]>
---
patch against 2.6.27-rc1
compiled & tested on AMD64 desktop

Richard


include/linux/proportions.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/proportions.h b/include/linux/proportions.h
index 5afc1b2..cf793bb 100644
--- a/include/linux/proportions.h
+++ b/include/linux/proportions.h
@@ -104,8 +104,8 @@ struct prop_local_single {
* snapshot of the last seen global state
* and a lock protecting this state
*/
- int shift;
unsigned long period;
+ int shift;
spinlock_t lock; /* protect the snapshot state */
};

--
1.5.5.1



2008-08-15 15:15:58

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] reorder struct prop_local_single to remove padding on 64 bit builds


* Richard Kennedy <[email protected]> wrote:

> reorder structure to remove 8 bytes of padding on 64 bit builds
>
> (also removes 8 bytes from task_struct)

applied all 3 patches to tip/sched/devel - thanks Richard!

Ingo