lkml.org 
[lkml]   [2010]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] trace: reorder struct ring_buffer_per_cpu to remove padding on 64bit
From
Date
On Thu, 2010-03-25 at 11:27 +0000, Richard Kennedy wrote:
> Reorder structure to remove 8 bytes of padding on 64 bit builds.
> This shrinks the size to 128 bytes so allowing allocation from a smaller
> slab & needed one fewer cache lines.
>

Thanks!

Just curious, did you use Arnaldo's pahole utility to find this?

-- Steve

> Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
> ----
> patch against 2.6.34-rc2
> compiled & booted on x86_64
>
> regards
> Richard
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index 05a9f83..421db5e 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -422,6 +422,7 @@ int ring_buffer_print_page_header(struct trace_seq
> *s)
> */
> struct ring_buffer_per_cpu {
> int cpu;
> + atomic_t record_disabled;
> struct ring_buffer *buffer;
> spinlock_t reader_lock; /* serialize readers */
> arch_spinlock_t lock;
> @@ -439,7 +440,6 @@ struct ring_buffer_per_cpu {
> unsigned long read;
> u64 write_stamp;
> u64 read_stamp;
> - atomic_t record_disabled;
> };
>
> struct ring_buffer {
>
>




\
 
 \ /
  Last update: 2010-03-25 14:41    [W:0.054 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site