From: Andi Kleen Date: Wed, 11 Jan 2006 21:44:57 +0000 (+0100) Subject: [PATCH] x86_64: Make the cpu_*_maps in kernel/sched.c read mostly X-Git-Tag: v2.6.16-rc1~329 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cef0c61380888af99b054937ed391fb28757836;p=linux-2.6 [PATCH] x86_64: Make the cpu_*_maps in kernel/sched.c read mostly They are referred to often so avoid potential false sharing for them. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/kernel/sched.c b/kernel/sched.c index d129e560cc..c0c60c926d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3980,12 +3980,12 @@ asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, * method, such as ACPI for e.g. */ -cpumask_t cpu_present_map; +cpumask_t cpu_present_map __read_mostly; EXPORT_SYMBOL(cpu_present_map); #ifndef CONFIG_SMP -cpumask_t cpu_online_map = CPU_MASK_ALL; -cpumask_t cpu_possible_map = CPU_MASK_ALL; +cpumask_t cpu_online_map __read_mostly = CPU_MASK_ALL; +cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; #endif long sched_getaffinity(pid_t pid, cpumask_t *mask)