diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2008-02-06 04:37:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:04 -0500 |
commit | b3242151906372f30f57feaa43b4cac96a23edb1 (patch) | |
tree | d258219aa13dfeae8d9fb5db1fd220a0664a680d /include/linux/percpu.h | |
parent | e7ca2d41a029577a8cff453d1445951d4f96bfd8 (diff) |
PERCPU : __percpu_alloc_mask() can dynamically size percpu_data storage
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>
Diffstat (limited to 'include/linux/percpu.h')
-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 50faa0ea28e4..1ac969724bb2 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -54,7 +54,7 @@ | |||
54 | #ifdef CONFIG_SMP | 54 | #ifdef CONFIG_SMP |
55 | 55 | ||
56 | struct percpu_data { | 56 | struct percpu_data { |
57 | void *ptrs[NR_CPUS]; | 57 | void *ptrs[1]; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata) | 60 | #define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata) |