* [PATCH] stop_machine: struct cpu_stopper, remove alignment padding on 64 bits
@ 2010-08-05 11:11 Richard Kennedy
2010-08-05 11:39 ` Tejun Heo
2010-08-05 11:40 ` Peter Zijlstra
0 siblings, 2 replies; 4+ messages in thread
From: Richard Kennedy @ 2010-08-05 11:11 UTC (permalink / raw)
To: Tejun Heo; +Cc: lkml, Peter Zijlstra
Reorder elements in structure cpu_stopper to remove alignment padding on
64 bit builds, this shrinks its size from 40 to 32 bytes saving 8 bytes
per cpu.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
---
patch against 2.6.35
compiled & tested on x86_64
regards
Richard
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 70f8d90..4372ccb 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -35,9 +35,9 @@ struct cpu_stop_done {
/* the actual stopper, one per every possible cpu, enabled on online cpus */
struct cpu_stopper {
spinlock_t lock;
+ bool enabled; /* is this stopper enabled? */
struct list_head works; /* list of pending works */
struct task_struct *thread; /* stopper thread */
- bool enabled; /* is this stopper enabled? */
};
static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] stop_machine: struct cpu_stopper, remove alignment padding on 64 bits
2010-08-05 11:11 [PATCH] stop_machine: struct cpu_stopper, remove alignment padding on 64 bits Richard Kennedy
@ 2010-08-05 11:39 ` Tejun Heo
2010-08-05 11:40 ` Peter Zijlstra
1 sibling, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2010-08-05 11:39 UTC (permalink / raw)
To: Richard Kennedy, akpm; +Cc: lkml, Peter Zijlstra
Hello,
On 08/05/2010 01:11 PM, Richard Kennedy wrote:
> Reorder elements in structure cpu_stopper to remove alignment padding on
> 64 bit builds, this shrinks its size from 40 to 32 bytes saving 8 bytes
> per cpu.
>
> Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Acked-by: Tejun Heo <tj@kernel.org>
Andrew, do you mind routing this one through your tree?
http://lkml.org/lkml/2010/8/5/168
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] stop_machine: struct cpu_stopper, remove alignment padding on 64 bits
2010-08-05 11:11 [PATCH] stop_machine: struct cpu_stopper, remove alignment padding on 64 bits Richard Kennedy
2010-08-05 11:39 ` Tejun Heo
@ 2010-08-05 11:40 ` Peter Zijlstra
2010-08-05 11:44 ` Tejun Heo
1 sibling, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2010-08-05 11:40 UTC (permalink / raw)
To: Richard Kennedy; +Cc: Tejun Heo, lkml, Ingo Molnar
On Thu, 2010-08-05 at 12:11 +0100, Richard Kennedy wrote:
> Reorder elements in structure cpu_stopper to remove alignment padding on
> 64 bit builds, this shrinks its size from 40 to 32 bytes saving 8 bytes
> per cpu.
>
> Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Looks good to me. Tejun will you take it or should I send it Ingo wards?
> ---
> diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
> index 70f8d90..4372ccb 100644
> --- a/kernel/stop_machine.c
> +++ b/kernel/stop_machine.c
> @@ -35,9 +35,9 @@ struct cpu_stop_done {
> /* the actual stopper, one per every possible cpu, enabled on online cpus */
> struct cpu_stopper {
> spinlock_t lock;
> + bool enabled; /* is this stopper enabled? */
> struct list_head works; /* list of pending works */
> struct task_struct *thread; /* stopper thread */
> - bool enabled; /* is this stopper enabled? */
> };
>
> static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] stop_machine: struct cpu_stopper, remove alignment padding on 64 bits
2010-08-05 11:40 ` Peter Zijlstra
@ 2010-08-05 11:44 ` Tejun Heo
0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2010-08-05 11:44 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Richard Kennedy, lkml, Ingo Molnar, akpm
Hello, Peter.
On 08/05/2010 01:40 PM, Peter Zijlstra wrote:
> On Thu, 2010-08-05 at 12:11 +0100, Richard Kennedy wrote:
>> Reorder elements in structure cpu_stopper to remove alignment padding on
>> 64 bit builds, this shrinks its size from 40 to 32 bytes saving 8 bytes
>> per cpu.
>>
>> Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
>
> Looks good to me. Tejun will you take it or should I send it Ingo wards?
I already asked whether Andrew could take it but routing through
Ingo's tree would be good too. Let's wait for Andrew a bit for now.
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-05 11:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 11:11 [PATCH] stop_machine: struct cpu_stopper, remove alignment padding on 64 bits Richard Kennedy
2010-08-05 11:39 ` Tejun Heo
2010-08-05 11:40 ` Peter Zijlstra
2010-08-05 11:44 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox