Skip to content

Commit

Permalink
[PATCH] x86_64: Make the cpu_*_maps in kernel/sched.c read mostly
Browse files Browse the repository at this point in the history
They are referred to often so avoid potential false sharing for them.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jan 12, 2006
1 parent fd78f11 commit 4cef0c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4cef0c6

Please sign in to comment.