[Devel] Re: [PATCH 3/5] Switch caches notification dynamically
Pavel Emelyanov
xemul at openvz.org
Thu Sep 27 01:24:09 PDT 2007
Christoph Lameter wrote:
> On Wed, 26 Sep 2007, Pavel Emelyanov wrote:
>
>>> Is it necessary to mark all the existing slabs with SLAB_DEBUG? Would it
>> Yup. Otherwise we can never receive a single event e.g. if we make
>> alloc/free in a loop, or similar, so that new slabs simply are not
>> created.
>
> Right but on the other hand: If objects in these slabs are freed then your
> counters get decremented and may go negative.
Nope :) I store a pointer on each accounted object, so if I have
a notification about freeing of not-accounted object I will not
decrement my counter ;)
I think it's too hard (if possible at all) to handle at generic level
whether we have notified this particular object allocation to some
listener or not, so I'd better leave this for the listener to handle
such a case.
Thanks,
Pavel
More information about the Devel
mailing list