[Devel] Re: [PATCH 5/5] Account for the slub objects

Pavel Emelyanov xemul at openvz.org
Wed Oct 3 00:29:13 PDT 2007


Christoph Lameter wrote:
> On Tue, 2 Oct 2007, Pavel Emelyanov wrote:
> 
>> Christoph Lameter wrote:
>>> On Mon, 1 Oct 2007, Pavel Emelyanov wrote:
>>>
>>>>>> +
>>>>> Quick check, slub_free_notify() and slab_alloc_notify() are called
>>>>> from serialized contexts, right?
>>>> Yup.
>>> How is it serialized?
>> They are booth called from __slab_alloc()/__slab_free() from under 
>> the slab_lock(page).
> 
> This means they are serialized per slab. Which means you can guarantee 
> that multiple of these callbacks are not done at the same time for the 
> same object. Is that what you need?


Yes I know it :) But I do not rely on this lock inside the callbacks. What
I need is to notify each new object only once, but this doesn't matter for
the callbacks whether there exists some lock or not. In other words - this
is just a coincidence that these callbacks are called from under this lock,
this was not done deliberately. Fortunately, the rollback in case when the
callbacks return an error is done easily under this lock.

Thanks,
Pavel
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list