linux/arch/x86/kernel/cpu
Eric Dumazet 63cc8c7515 percpu: introduce DEFINE_PER_CPU_PAGE_ALIGNED() macro
While examining holes in percpu section I found this :

c05f5000 D per_cpu__current_task
c05f5000 D __per_cpu_start
c05f5004 D per_cpu__cpu_number
c05f5008 D per_cpu__irq_regs
c05f500c d per_cpu__cpu_devices
c05f5040 D per_cpu__cyc2ns

<Big Hole of about 4000 bytes>

c05f6000 d per_cpu__cpuid4_info
c05f6004 d per_cpu__cache_kobject
c05f6008 d per_cpu__index_kobject

<Big Hole of about 4000 bytes>

c05f7000 D per_cpu__gdt_page

This is because gdt_page is a percpu variable, defined with
a page alignement, and linker is doing its job, two times because of .o
nesting in the build process.

I introduced a new macro DEFINE_PER_CPU_PAGE_ALIGNED() to avoid
wasting this space. All page aligned variables (only one at this time)
are put in a separate
subsection .data.percpu.page_aligned, at the very begining of percpu zone.

Before patch , on a x86_32 machine :

.data.percpu                30232   3227471872
.data.percpu                22168   3227471872

Thats 8064 bytes saved for each CPU.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-25 07:03:46 +02:00
..
cpufreq [CPUFREQ] expose cpufreq coordination requirements regardless of coordination mechanism 2008-04-28 16:27:08 -04:00
mcheck x86-64: extend MCE CPU quirk handling 2008-04-26 17:35:46 +02:00
mtrr Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes 2008-04-29 09:03:19 -07:00
addon_cpuid_features.c x86: cleanup PAT cpu validation 2008-05-08 15:43:51 +02:00
amd.c x86: remove unused function amd_init_cpu() 2008-04-26 17:35:46 +02:00
bugs.c Fix booting pentium+ with dodgy TSC 2008-04-06 16:10:40 -07:00
centaur.c x86: clean up cpu capabilities accesses, centaur.c 2008-04-17 17:40:51 +02:00
common.c percpu: introduce DEFINE_PER_CPU_PAGE_ALIGNED() macro 2008-05-25 07:03:46 +02:00
cpu.h x86: use ELF section to list CPU vendor specific code 2008-04-17 17:40:47 +02:00
cyrix.c x86: clean up cpu capabilities accesses, cyrix.c 2008-04-17 17:40:51 +02:00
feature_names.c x86: arch/x86/kernel/cpu/feature_names.c - use angle brackets for include 2008-04-17 17:40:57 +02:00
intel_cacheinfo.c x86: modify show_shared_cpu_map in intel_cacheinfo 2008-04-19 19:44:59 +02:00
intel.c x86: clean up cpu capabilities in arch/x86/kernel/cpu/intel.c 2008-04-17 17:40:51 +02:00
Makefile x86: remove NexGen support 2008-04-26 17:35:47 +02:00
perfctr-watchdog.c x86: fix watchdog ops for CoreDuo 2008-04-26 17:35:46 +02:00
proc.c arch: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:14:49 -04:00
transmeta.c x86: clean up cpu capabilities accesses, transmeta.c 2008-04-17 17:40:51 +02:00
umc.c x86: coding style fixes to arch/x86/kernel/cpu/umc.c 2008-04-17 17:40:49 +02:00