Commit ed59ecbf8904a40cf0a1ee5d6f100d76d2f44e5f
1 parent
ed6c1115c8
Exists in
master
and in
7 other branches
Revert "Slub: UP bandaid"
This reverts commit 5249d039500f05a5ab379286b1d23ab9b04d3f2c. It's not needed after commit bbddff0545878a8649c091a9dd7c43ce91516734 ("percpu: use percpu allocator on UP too").
Showing 1 changed file with 0 additions and 16 deletions Side-by-side Diff
mm/slub.c
... | ... | @@ -2104,24 +2104,8 @@ |
2104 | 2104 | |
2105 | 2105 | static inline int alloc_kmem_cache_cpus(struct kmem_cache *s) |
2106 | 2106 | { |
2107 | -#ifdef CONFIG_SMP | |
2108 | - /* | |
2109 | - * Will use reserve that does not require slab operation during | |
2110 | - * early boot. | |
2111 | - */ | |
2112 | 2107 | BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE < |
2113 | 2108 | SLUB_PAGE_SHIFT * sizeof(struct kmem_cache_cpu)); |
2114 | -#else | |
2115 | - /* | |
2116 | - * Special hack for UP mode. allocpercpu() falls back to kmalloc | |
2117 | - * operations. So we cannot use that before the slab allocator is up | |
2118 | - * Simply get the smallest possible compound page. The page will be | |
2119 | - * released via kfree() when the cpu caches are resized later. | |
2120 | - */ | |
2121 | - if (slab_state < UP) | |
2122 | - s->cpu_slab = (__percpu void *)kmalloc_large(PAGE_SIZE << 1, GFP_NOWAIT); | |
2123 | - else | |
2124 | -#endif | |
2125 | 2109 | |
2126 | 2110 | s->cpu_slab = alloc_percpu(struct kmem_cache_cpu); |
2127 | 2111 |