[Devel] Re: [PATCH] checkpoint/restart of robust futex lists

Serge E. Hallyn serue at us.ibm.com
Wed Jun 3 08:58:04 PDT 2009


Quoting Matt Helsley (matthltc at us.ibm.com):
> diff --git a/checkpoint/process.c b/checkpoint/process.c
> index b604a85..084a2e4 100644
> --- a/checkpoint/process.c
> +++ b/checkpoint/process.c
> @@ -42,6 +42,17 @@ static int checkpoint_task_struct(struct ckpt_ctx *ctx, struct task_struct *t)
> 
>  	h->task_comm_len = TASK_COMM_LEN;
> 
> +#ifdef CONFIG_FUTEX
> +	/* These are __user pointers and can be saved without the objhash. */
> +	h->robust_futex_list = t->robust_list;
> +	h->robust_futex_head_len = sizeof(t->robust_list);
> +#ifdef CONFIG_COMPAT
> +	h->compat_robust_futex_list = t->compat_robust_list;
> +	h->compat_robust_futex_head_len = sizeof(t->compat_robust_list);
> +#endif
> +	/* FIXME save pi futex state?? */
> +#endif
> +

So, I'm torn on this, but this does look like a prime example of code
which is destined to go stale and out of sync with the main futex code.

On the other hand, if we define futex_checkpoint() and futex_restart(),
and do that for every little thing we c/r, that could get out of hand...

But I think it's a risk worth taking.  What do you think?

Also, could you send out your testcase so I can add it to cr_tests?

thanks,
-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