[Devel] Re: [PATCH] checkpoint/restart of robust futex lists
Oren Laadan
orenl at cs.columbia.edu
Mon Jun 8 09:31:31 PDT 2009
Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl at cs.columbia.edu):
>>
>> Matt Helsley wrote:
>>> Save and restore the [compat_]robust_list member of the task struct.
>>>
>>> These lists record which futexes the task holds. To keep the overhead of
>>> robust futexes low the list is kept in userspace. When the task exits the
>>> kernel carefully walks these lists to recover held futexes that
>>> other tasks may be attempting to acquire with FUTEX_WAIT.
>>>
>>> Because they point to userspace memory that is saved/restored by
>>> checkpoint/restart saving the list pointers works.
>>>
>>> While saving the pointers works during checkpoint, restart is tricky
>>> because the robust futex ABI contains provisions for changes based on
>>> checking the size of the list head. So we need to save the length of
>>> the list head too in order to make sure that the kernel used during
>>> restart is capable of handling that ABI. Since there is only one ABI
>>> supported at the moment taking the list head's size is simple. Should
>>> the ABI change we will need to use the same size as specified during
>>> sys_set_robust_list() and hence some new means of determining the length
>>> of this userspace structure in sys_checkpoint would be required.
>>>
>>> Rather than rewrite the logic that checks and handles the ABI we reuse
>>> sys_set_robust_list() by factoring out the body of the function and
>>> calling it during restart.
>>>
>>> Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
>> Patch looks good. Too bad we don't support futex, yet...
>
> ?
>
> IIUC (from Matt and Dave), after this patch, you might need something
> for PI futexes, but otherwise non-contended cases "just work" because
> there is no kernel involvement.
That's what I thought. But I also thought that a checkpoint would
fail anyway as soon as it hits the futex-file-descriptor. Or am I
missing something ?
Oren.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list