[Devel] Re: [PATCH] checkpoint/restart of robust futex lists
Serge E. Hallyn
serue at us.ibm.com
Mon Jun 8 07:08:10 PDT 2009
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.
-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list