diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1932,6 +1932,7 @@ init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s) | |||
1932 | INIT_LIST_HEAD(&n->partial); | 1932 | INIT_LIST_HEAD(&n->partial); |
1933 | #ifdef CONFIG_SLUB_DEBUG | 1933 | #ifdef CONFIG_SLUB_DEBUG |
1934 | atomic_long_set(&n->nr_slabs, 0); | 1934 | atomic_long_set(&n->nr_slabs, 0); |
1935 | atomic_long_set(&n->total_objects, 0); | ||
1935 | INIT_LIST_HEAD(&n->full); | 1936 | INIT_LIST_HEAD(&n->full); |
1936 | #endif | 1937 | #endif |
1937 | } | 1938 | } |
@@ -2312,7 +2313,7 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags, | |||
2312 | 2313 | ||
2313 | s->refcount = 1; | 2314 | s->refcount = 1; |
2314 | #ifdef CONFIG_NUMA | 2315 | #ifdef CONFIG_NUMA |
2315 | s->remote_node_defrag_ratio = 100; | 2316 | s->remote_node_defrag_ratio = 1000; |
2316 | #endif | 2317 | #endif |
2317 | if (!init_kmem_cache_nodes(s, gfpflags & ~SLUB_DMA)) | 2318 | if (!init_kmem_cache_nodes(s, gfpflags & ~SLUB_DMA)) |
2318 | goto error; | 2319 | goto error; |
@@ -4058,7 +4059,7 @@ static ssize_t remote_node_defrag_ratio_store(struct kmem_cache *s, | |||
4058 | if (err) | 4059 | if (err) |
4059 | return err; | 4060 | return err; |
4060 | 4061 | ||
4061 | if (ratio < 100) | 4062 | if (ratio <= 100) |
4062 | s->remote_node_defrag_ratio = ratio * 10; | 4063 | s->remote_node_defrag_ratio = ratio * 10; |
4063 | 4064 | ||
4064 | return length; | 4065 | return length; |