[CRIU] Re: [PATCH 08/14] files: Restore epolls lately
Pavel Emelyanov
xemul at parallels.com
Thu May 3 09:11:06 EDT 2012
On 05/03/2012 05:05 PM, Cyrill Gorcunov wrote:
> On Thu, May 03, 2012 at 04:55:00PM +0400, Pavel Emelyanov wrote:
>> On 04/29/2012 05:14 PM, Cyrill Gorcunov wrote:
>>>
>>> We need to restore epolls lately since they might
>>> use sockets/pipes/reg-files.
>>>
>>> For this sake collect_fd splited to two functions,
>>> collect_fd itself and alloc_fdinfo_list_entry.
>>>
>>> Firstly we allocate fdinfo_list_entry and then
>>> either collect it immediately if it's not epoll
>>> file or postpone collecting.
>>>
>>> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
>>> ---
>>> files.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++----------------
>>> 1 files changed, 53 insertions(+), 18 deletions(-)
>>>
>>
>> Ah, now I see where the fix for eventpoll restore is.
>> I believe the fix can be done simpler. Like this:
>
> Been there, tried that :) Doesn't work. We have
>
> list_for_each_entry(l, &fdesc->fd_info_head, desc_list)
> if (l->pid > le->pid)
> break;
>
> list_add_tail(&le->desc_list, &l->desc_list);
This list sorting is kept.
> list_add_tail(&le->ps_list, fds);
This is not. We just restore _local_ fd-s in reverse order.
> thus desc_list get sorted (in sake of file_master()), and fds should be
> sorted respectively, otherwise restore stick's in waiting for
> files creation, if you need more details I can print out debug
> output.
>
> Cyrill
> .
>
More information about the CRIU
mailing list