From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [PATCH] checkpoint/restart of robust futex lists
Date: Mon, 08 Jun 2009 12:31:31 -0400 [thread overview]
Message-ID: <4A2D3CE3.6030400@cs.columbia.edu> (raw)
In-Reply-To: <20090608140810.GB29432-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org):
>>
>> 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-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
>> 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.
next prev parent reply other threads:[~2009-06-08 16:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-03 4:19 [PATCH] checkpoint/restart of robust futex lists Matt Helsley
[not found] ` <20090603041919.GO9285-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-03 15:58 ` Serge E. Hallyn
[not found] ` <20090603155804.GA7848-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-08 2:28 ` Oren Laadan
2009-06-08 2:37 ` Oren Laadan
[not found] ` <4A2C7972.9090404-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-06-08 14:08 ` Serge E. Hallyn
[not found] ` <20090608140810.GB29432-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-08 16:31 ` Oren Laadan [this message]
[not found] ` <4A2D3CE3.6030400-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-06-08 16:59 ` Serge E. Hallyn
[not found] ` <20090608165951.GA3610-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-08 18:34 ` Oren Laadan
2009-06-18 17:12 ` Oren Laadan
[not found] ` <4A3A7572.9030907-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-06-18 19:24 ` Nathan Lynch
[not found] ` <m31vphgxa0.fsf-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2009-06-19 3:41 ` Oren Laadan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A2D3CE3.6030400@cs.columbia.edu \
--to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.