Skip to content

Commit

Permalink
Revert "Slub: UP bandaid"
Browse files Browse the repository at this point in the history
This reverts commit 5249d039500f05a5ab379286b1d23ab9b04d3f2c. It's not needed
after commit bbddff0 ("percpu: use percpu
allocator on UP too").
  • Loading branch information
Pekka Enberg committed Oct 2, 2010
1 parent ed6c111 commit ed59ecb
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2104,24 +2104,8 @@ init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s)

static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
{
#ifdef CONFIG_SMP
/*
* Will use reserve that does not require slab operation during
* early boot.
*/
BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE <
SLUB_PAGE_SHIFT * sizeof(struct kmem_cache_cpu));
#else
/*
* Special hack for UP mode. allocpercpu() falls back to kmalloc
* operations. So we cannot use that before the slab allocator is up
* Simply get the smallest possible compound page. The page will be
* released via kfree() when the cpu caches are resized later.
*/
if (slab_state < UP)
s->cpu_slab = (__percpu void *)kmalloc_large(PAGE_SIZE << 1, GFP_NOWAIT);
else
#endif

s->cpu_slab = alloc_percpu(struct kmem_cache_cpu);

Expand Down

0 comments on commit ed59ecb

Please sign in to comment.