Re: slab quirks in DEBUG, ctor, and initialization

2007-12-17 Thread Pekka J Enberg
Hi John, On Mon, 17 Dec 2007, John Reiser wrote: > idr_pre_get calls kmem_cache_alloc, which constructs 'struct idr_layer' > via the cachep->ctor() call from cache_alloc_debugcheck_after to > idr_cache_ctor, and not via cache_init_objs. So if DEBUG is off, > then idr_cache_ctor does not get its

Re: slab quirks in DEBUG, ctor, and initialization

2007-12-17 Thread John Reiser
Hi Pekka, >>In mm/slab.c, the DEBUG variant of cache_alloc_debugcheck_after >>might call cachep->ctor(objp, cachep, 0); but the non-DEBUG >>variant does absolutely nothing. idr_pre_get is a routine >>which notices the difference. > > > How does ipr_pre_get notice this? idr_pre_get calls

Re: slab quirks in DEBUG, ctor, and initialization

2007-12-17 Thread Pekka Enberg
Hi John, On Dec 17, 2007 5:47 PM, John Reiser <[EMAIL PROTECTED]> wrote: > In mm/slab.c, the DEBUG variant of cache_alloc_debugcheck_after > might call cachep->ctor(objp, cachep, 0); but the non-DEBUG > variant does absolutely nothing. idr_pre_get is a routine > which notices the difference.

slab quirks in DEBUG, ctor, and initialization

2007-12-17 Thread John Reiser
In mm/slab.c, the DEBUG variant of cache_alloc_debugcheck_after might call cachep->ctor(objp, cachep, 0); but the non-DEBUG variant does absolutely nothing. idr_pre_get is a routine which notices the difference. Even when cache_alloc_debugcheck_after does invoke the ctor, then it is

slab quirks in DEBUG, ctor, and initialization

2007-12-17 Thread John Reiser
In mm/slab.c, the DEBUG variant of cache_alloc_debugcheck_after might call cachep-ctor(objp, cachep, 0); but the non-DEBUG variant does absolutely nothing. idr_pre_get is a routine which notices the difference. Even when cache_alloc_debugcheck_after does invoke the ctor, then it is conditional

Re: slab quirks in DEBUG, ctor, and initialization

2007-12-17 Thread Pekka Enberg
Hi John, On Dec 17, 2007 5:47 PM, John Reiser [EMAIL PROTECTED] wrote: In mm/slab.c, the DEBUG variant of cache_alloc_debugcheck_after might call cachep-ctor(objp, cachep, 0); but the non-DEBUG variant does absolutely nothing. idr_pre_get is a routine which notices the difference. How

Re: slab quirks in DEBUG, ctor, and initialization

2007-12-17 Thread John Reiser
Hi Pekka, In mm/slab.c, the DEBUG variant of cache_alloc_debugcheck_after might call cachep-ctor(objp, cachep, 0); but the non-DEBUG variant does absolutely nothing. idr_pre_get is a routine which notices the difference. How does ipr_pre_get notice this? idr_pre_get calls

Re: slab quirks in DEBUG, ctor, and initialization

2007-12-17 Thread Pekka J Enberg
Hi John, On Mon, 17 Dec 2007, John Reiser wrote: idr_pre_get calls kmem_cache_alloc, which constructs 'struct idr_layer' via the cachep-ctor() call from cache_alloc_debugcheck_after to idr_cache_ctor, and not via cache_init_objs. So if DEBUG is off, then idr_cache_ctor does not get its