Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

oprofile: don't request cache line alignment for cpu_buffer

Alignment was previously requested because cpu_buffer was an [NR_CPUS]
array, to avoid cache line sharing between CPUS.

After commit 608dfddd845da5ab6accef70154c8910529699f7 (oprofile: change
cpu_buffer from array to per_cpu variable ), we dont need to force an
alignement anymore since cpu_buffer sits in per_cpu zone.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Mike Travis <travis@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Eric Dumazet and committed by
Linus Torvalds
8b8b4988 f7c5a770

+2 -2
+1 -1
drivers/oprofile/cpu_buffer.c
··· 27 27 #include "buffer_sync.h" 28 28 #include "oprof.h" 29 29 30 - DEFINE_PER_CPU_SHARED_ALIGNED(struct oprofile_cpu_buffer, cpu_buffer); 30 + DEFINE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer); 31 31 32 32 static void wq_sync_buffer(struct work_struct *work); 33 33
+1 -1
drivers/oprofile/cpu_buffer.h
··· 46 46 unsigned long sample_invalid_eip; 47 47 int cpu; 48 48 struct delayed_work work; 49 - } ____cacheline_aligned; 49 + }; 50 50 51 51 DECLARE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer); 52 52