From: Vlad Zolotarov <vlad@scalemp.com>
To: "linux-kernel" <linux-kernel@vger.kernel.org>
Cc: alan@lxorguk.ukuu.org.uk,
"Shai Fultheim (Shai@ScaleMP.com)" <Shai@scalemp.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>
Subject: [PATCH 2/2] x86: Move x86_cpu_to_apicid to the __read_mostly section
Date: Tue, 24 Apr 2012 14:29:53 +0300 [thread overview]
Message-ID: <201204241429.54089.vlad@scalemp.com> (raw)
From: Shai Fultheim <shai@scalemp.com>
x86_cpu_to_apicid is only written to during initialization. Benchmarks
show that moving it to the __read_mostly section helps avoid false
sharing on large multiprocessing systems.
Signed-off-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Vlad Zolotarov <vlad@scalemp.com>
---
arch/x86/include/asm/smp.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 0434c40..b9d6c1e 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -53,7 +53,7 @@ static inline struct cpumask *cpu_llc_shared_mask(int cpu)
return per_cpu(cpu_llc_shared_map, cpu);
}
-DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
+DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid);
DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
DECLARE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid);
--
1.7.7.6
next reply other threads:[~2012-04-24 11:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 11:29 Vlad Zolotarov [this message]
2012-05-07 10:52 ` [PATCH 2/2] x86: Move x86_cpu_to_apicid to the __read_mostly section Ingo Molnar
2012-05-07 13:41 ` Vlad Zolotarov
2012-05-07 14:07 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2012-04-17 11:16 Vlad Zolotarov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201204241429.54089.vlad@scalemp.com \
--to=vlad@scalemp.com \
--cc=Shai@scalemp.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox