diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-31 12:25:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-31 12:25:37 -0400 |
commit | 6581058f44533f9d45548bcfe986c125376859e9 (patch) | |
tree | a5c811ace1fea5bccfbc5146048b5d2b3655bdcf /mm | |
parent | fa9d594c46679485c5e3642d2bd9e874a7e07b19 (diff) | |
parent | eacbbae385bf492229e84024863960d3160547c7 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
slab: use NUMA_NO_NODE
slab: remove one NR_CPUS dependency
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -3403,7 +3403,7 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, | |||
3403 | cache_alloc_debugcheck_before(cachep, flags); | 3403 | cache_alloc_debugcheck_before(cachep, flags); |
3404 | local_irq_save(save_flags); | 3404 | local_irq_save(save_flags); |
3405 | 3405 | ||
3406 | if (nodeid == -1) | 3406 | if (nodeid == NUMA_NO_NODE) |
3407 | nodeid = slab_node; | 3407 | nodeid = slab_node; |
3408 | 3408 | ||
3409 | if (unlikely(!cachep->nodelists[nodeid])) { | 3409 | if (unlikely(!cachep->nodelists[nodeid])) { |
@@ -3934,7 +3934,7 @@ fail: | |||
3934 | 3934 | ||
3935 | struct ccupdate_struct { | 3935 | struct ccupdate_struct { |
3936 | struct kmem_cache *cachep; | 3936 | struct kmem_cache *cachep; |
3937 | struct array_cache *new[NR_CPUS]; | 3937 | struct array_cache *new[0]; |
3938 | }; | 3938 | }; |
3939 | 3939 | ||
3940 | static void do_ccupdate_local(void *info) | 3940 | static void do_ccupdate_local(void *info) |
@@ -3956,7 +3956,8 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit, | |||
3956 | struct ccupdate_struct *new; | 3956 | struct ccupdate_struct *new; |
3957 | int i; | 3957 | int i; |
3958 | 3958 | ||
3959 | new = kzalloc(sizeof(*new), gfp); | 3959 | new = kzalloc(sizeof(*new) + nr_cpu_ids * sizeof(struct array_cache *), |
3960 | gfp); | ||
3960 | if (!new) | 3961 | if (!new) |
3961 | return -ENOMEM; | 3962 | return -ENOMEM; |
3962 | 3963 | ||