Re: [PATCH v2] mm/slab_common: Support the slub_debug boot option on specific object size

2015-04-23 Thread Gavin Guo
Hi Rasmus, On Thu, Apr 23, 2015 at 5:55 PM, Rasmus Villemoes wrote: > On Wed, Apr 22 2015, Gavin Guo wrote: > >> /* >> + * The kmalloc_names is for temporary usage to make >> + * slub_debug=,kmalloc-xx option work in the boot time. The >> + * kmalloc_index() support to 2^26=

Re: [PATCH v2] mm/slab_common: Support the slub_debug boot option on specific object size

2015-04-23 Thread Rasmus Villemoes
On Wed, Apr 22 2015, Gavin Guo wrote: > /* > + * The kmalloc_names is for temporary usage to make > + * slub_debug=,kmalloc-xx option work in the boot time. The > + * kmalloc_index() support to 2^26=64MB. So, the final entry of the > + * table is kmalloc-67108864. > +

Re: [PATCH v2] mm/slab_common: Support the slub_debug boot option on specific object size

2015-04-22 Thread Andrew Morton
On Thu, 23 Apr 2015 11:10:40 +0800 Gavin Guo wrote: > >> for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) { > >> if (!kmalloc_caches[i]) { > >> - kmalloc_caches[i] = create_kmalloc_cache(NULL, > >> + kmalloc_caches[i] = create_k

Re: [PATCH v2] mm/slab_common: Support the slub_debug boot option on specific object size

2015-04-22 Thread Gavin Guo
On Thu, Apr 23, 2015 at 5:00 AM, Andrew Morton wrote: > On Wed, 22 Apr 2015 16:33:38 +0800 Gavin Guo wrote: > >> The slub_debug=PU,kmalloc-xx cannot work because in the >> create_kmalloc_caches() the s->name is created after the >> create_kmalloc_cache() is called. The name is NULL in the >> crea

Re: [PATCH v2] mm/slab_common: Support the slub_debug boot option on specific object size

2015-04-22 Thread Andrew Morton
On Wed, 22 Apr 2015 14:00:39 -0700 Andrew Morton wrote: > slab_kmem_cache_release() still does kfree_const(s->name). It will > crash? er, ignore this bit.. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majo

Re: [PATCH v2] mm/slab_common: Support the slub_debug boot option on specific object size

2015-04-22 Thread Andrew Morton
On Wed, 22 Apr 2015 16:33:38 +0800 Gavin Guo wrote: > The slub_debug=PU,kmalloc-xx cannot work because in the > create_kmalloc_caches() the s->name is created after the > create_kmalloc_cache() is called. The name is NULL in the > create_kmalloc_cache() so the kmem_cache_flags() would not set the

Re: [PATCH v2] mm/slab_common: Support the slub_debug boot option on specific object size

2015-04-22 Thread Christoph Lameter
On Wed, 22 Apr 2015, Gavin Guo wrote: > The slub_debug=PU,kmalloc-xx cannot work because in the > create_kmalloc_caches() the s->name is created after the > create_kmalloc_cache() is called. The name is NULL in the > create_kmalloc_cache() so the kmem_cache_flags() would not set the > slub_debug f

[PATCH v2] mm/slab_common: Support the slub_debug boot option on specific object size

2015-04-22 Thread Gavin Guo
The slub_debug=PU,kmalloc-xx cannot work because in the create_kmalloc_caches() the s->name is created after the create_kmalloc_cache() is called. The name is NULL in the create_kmalloc_cache() so the kmem_cache_flags() would not set the slub_debug flags to the s->flags. The fix here set up a kmall