diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2008-03-28 14:42:42 -0400 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2008-04-18 18:53:21 -0700 |
commit | 28680bfb8269703def997e2269caf9bfe2de489c (patch) | |
tree | 9400b61d56c50f3505beae100c1071d09f8629ba /include | |
parent | bcd817a3949cfc772b97f3f1428be35488e6266b (diff) |
PERCPU : __percpu_alloc_mask() can dynamically size percpu_data storage
upstream commit: b3242151906372f30f57feaa43b4cac96a23edb1
Instead of allocating a fix sized array of NR_CPUS pointers for percpu_data,
we can use nr_cpu_ids, which is generally < NR_CPUS.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/percpu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 926adaae0f96..1702ab56ed3c 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -34,7 +34,7 @@ #ifdef CONFIG_SMP struct percpu_data { - void *ptrs[NR_CPUS]; + void *ptrs[1]; }; #define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata) |