Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215935
b: refs/heads/master
c: 6c182dc
h: refs/heads/master
i:
  215933: 7ed8440
  215931: 8b03599
  215927: 09120f8
  215919: 551cc68
  215903: f15d970
  215871: cc0808e
  215807: 499f630
v: v3
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Oct 2, 2010
1 parent affa5c9 commit 497a1c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55136592fedf5cc58c03d9b5eb66103a9013d4e5
refs/heads/master: 6c182dc0de26ef97efb6a97a8deab074833764e7
17 changes: 4 additions & 13 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2062,23 +2062,14 @@ init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s)
#endif
}

static DEFINE_PER_CPU(struct kmem_cache_cpu, kmalloc_percpu[KMALLOC_CACHES]);

static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
{
if (s < kmalloc_caches + KMALLOC_CACHES && s >= kmalloc_caches)
/*
* Boot time creation of the kmalloc array. Use static per cpu data
* since the per cpu allocator is not available yet.
*/
s->cpu_slab = kmalloc_percpu + (s - kmalloc_caches);
else
s->cpu_slab = alloc_percpu(struct kmem_cache_cpu);
BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE <
SLUB_PAGE_SHIFT * sizeof(struct kmem_cache_cpu));

if (!s->cpu_slab)
return 0;
s->cpu_slab = alloc_percpu(struct kmem_cache_cpu);

return 1;
return s->cpu_slab != NULL;
}

#ifdef CONFIG_NUMA
Expand Down

0 comments on commit 497a1c2

Please sign in to comment.