summaryrefslogtreecommitdiff
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2003-06-26 19:43:55 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-06-26 19:43:55 -0700
commit6d338bb299e65cc7a5d86fce60daa03a81ffb41d (patch)
tree0a55c58ed879bafbfb7d970af40011c226b7108d /kernel/exit.c
parent5e49d31efe65aa18e9643c0174353a3aacc234fa (diff)
[PATCH] Use Local Percpu Macros for Local Percpu Variables
In general, it is more better to use get_cpu_var() and __get_cpu_var() to access per-cpu variables on this CPU than to use smp_processor_id() and per_cpu(). In the current default implemention they are equivalent, but on IA64 the former is already faster, and other archs will follow.
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 7dee095b31bd..367854d246ef 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -41,7 +41,7 @@ static void __unhash_process(struct task_struct *p)
detach_pid(p, PIDTYPE_PGID);
detach_pid(p, PIDTYPE_SID);
if (p->pid)
- per_cpu(process_counts, smp_processor_id())--;
+ __get_cpu_var(process_counts)--;
}
REMOVE_LINKS(p);