diff options
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1803,7 +1803,7 @@ static struct page *get_object_page(const void *x) | |||
1803 | */ | 1803 | */ |
1804 | static int slub_min_order; | 1804 | static int slub_min_order; |
1805 | static int slub_max_order = PAGE_ALLOC_COSTLY_ORDER; | 1805 | static int slub_max_order = PAGE_ALLOC_COSTLY_ORDER; |
1806 | static int slub_min_objects = 4; | 1806 | static int slub_min_objects; |
1807 | 1807 | ||
1808 | /* | 1808 | /* |
1809 | * Merge control. If this is set then no merging of slab caches will occur. | 1809 | * Merge control. If this is set then no merging of slab caches will occur. |
@@ -1880,6 +1880,8 @@ static inline int calculate_order(int size) | |||
1880 | * we reduce the minimum objects required in a slab. | 1880 | * we reduce the minimum objects required in a slab. |
1881 | */ | 1881 | */ |
1882 | min_objects = slub_min_objects; | 1882 | min_objects = slub_min_objects; |
1883 | if (!min_objects) | ||
1884 | min_objects = 4 * (fls(nr_cpu_ids) + 1); | ||
1883 | while (min_objects > 1) { | 1885 | while (min_objects > 1) { |
1884 | fraction = 8; | 1886 | fraction = 8; |
1885 | while (fraction >= 4) { | 1887 | while (fraction >= 4) { |