All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: [PATCH 1/1] fill vdso with syscall32_setup_pages if TIF_IA32 on x86_64
Date: Fri, 05 Feb 2010 20:04:12 -0500	[thread overview]
Message-ID: <4B6CC00C.2090509@cs.columbia.edu> (raw)
In-Reply-To: <20100205233800.GA17057-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>



Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org):
>>
>> Serge E. Hallyn wrote:
>>> Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org):
>>>> Serge E. Hallyn wrote:
>>>>> Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org):
>>>>>> Cool !
>>>>>>
>>>>>> So what do we have working now for 64 bit kernel (for 32 bit kernel
>>>>>> we know it works...):
>>>>>>
>>>>>> 	'restart'	checkpointed
>>>>>> 	 program	  program
>>>>>> 	----------------------------------------
>>>>>> 	  64bit		  64bit		-> works
>>>>>> 	  32bit		  32bit		-> works
>>>>>>
>>>>>> 	  64bit		  32bit		-> ?????
> 
> s/?????/Rejected/
> 
> CKPT_ARCH_ID is of course different for X86_32 than X86_64, so
> we refuse restart in restore_read_header().
> 
> -serge
> 

lol ... that's actually funny !

Anyway, in light of the IRC discussions, here are the cases again:


original	original	restart		target
program		kernel		program		kernel
--------	---------	--------	--------
64 bit		64 bit		64 bit		64 bit	  [0] works

32 bit		32 bit		32 bit		32 bit	  [0] works
32 bit		64 bit		32 bit		64 bit	  [0] works

32 bit		32 bit		32 bit		64 bit	  [1]
32 bit		64 bit		32 bit		32 bit	  [1]

32 bit		any		64 bit		64 bit	  [2]
64 bit		64 bit		32 bit		64 bit	  [2]

[0] The first 3 cases are "homogeneous", with conditions equal at
checkpoint and restart. AFAIK, they work.

[1] The next two cases consider 32 bit program, and vary only the
environment - the kernel may change from 32 to 64 or back. We want
them to work.

IIUC, your comment above means that they don't work because the
CKPT_ARCH_ID is a mismatch. The fix should be trivial - either
make 'restart' modify it, or make the kernel tolerate it.

[2] The last two cases consider the case when the restart program
itself has different bit-ness than the checkpointed program (and
transition may occur in either direction). While lower priority,
we would like this to work, too.

The question is whether the transition 64 -> 32 (or 32 ->64) from
the 'restart' program to the restarting task should happen in the
kernel as part of sys_restart(), or in user space using an execve()
syscall before calling sys_restart().

Doing so in user space is not trivial when threads are involved,
since the exec must then happen before the creation of threads (or
it will kill them). This will complicate the implementation of the
MakeForest() algorithm which relies on all all descendents seeing
the same data structures.

Doing so in kernel should have been easy in theory, but in practice
so far it isn't working; and it may be frowned upon by kernel people
(allowing such transition not in exec).

Oren.

  parent reply	other threads:[~2010-02-06  1:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27  7:16 [PATCH 1/1] fill vdso with syscall32_setup_pages if TIF_IA32 on x86_64 Serge E. Hallyn
     [not found] ` <20100127071636.GA16624-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-27 14:59   ` Oren Laadan
     [not found]     ` <Pine.LNX.4.64.1001270954120.8974-CXF6herHY6ykSYb+qCZC/1i27PF6R63G9nwVQlTi/Pw@public.gmane.org>
2010-01-27 20:10       ` Serge E. Hallyn
     [not found]         ` <20100127201037.GA23119-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-27 20:51           ` Oren Laadan
     [not found]             ` <4B60A763.4030806-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-01-27 21:10               ` Serge E. Hallyn
     [not found]                 ` <20100127211052.GA27579-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-27 21:13                   ` Oren Laadan
     [not found]                     ` <4B60AC7E.2010908-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-02-05 23:38                       ` Serge E. Hallyn
     [not found]                         ` <20100205233800.GA17057-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-06  1:04                           ` Oren Laadan [this message]
     [not found]                             ` <4B6CC00C.2090509-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-02-06  6:26                               ` Matt Helsley
     [not found]                                 ` <20100206062650.GG3714-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-02-06 15:43                                   ` Oren Laadan
2010-02-08 17:40                                   ` Oren Laadan
2010-02-06 17:09                               ` Serge E. Hallyn
     [not found]                                 ` <20100206170902.GA20497-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2010-02-08 14:43                                   ` Oren Laadan
     [not found]                                     ` <4B7022FE.4060704-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-02-08 15:31                                       ` Serge E. Hallyn
     [not found]                                         ` <20100208153145.GB9120-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-08 16:17                                           ` Oren Laadan
     [not found]                                             ` <4B703936.3010200-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-02-09 14:54                                               ` Serge E. Hallyn

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=4B6CC00C.2090509@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@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.