linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Dave Hansen
	<dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
	mpm-VDJrAJ4Gl5ZBDgjK7y7TUQ@public.gmane.org,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
	xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org
Subject: Re: How much of a mess does OpenVZ make? ;) Was: What can OpenVZ do?
Date: Sun, 1 Mar 2009 23:56:59 +0300	[thread overview]
Message-ID: <20090301205659.GA7276@x200.localdomain> (raw)
In-Reply-To: <20090301200231.GA25276-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

On Sun, Mar 01, 2009 at 02:02:31PM -0600, Serge E. Hallyn wrote:
> Quoting Alexey Dobriyan (adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org):
> > On Fri, Feb 27, 2009 at 01:31:12AM +0300, Alexey Dobriyan wrote:
> > > This is collecting and start of dumping part of cleaned up OpenVZ C/R
> > > implementation, FYI.
> > 
> > OK, here is second version which shows what to do with shared objects
> > (cr_dump_nsproxy(), cr_dump_task_struct()), introduced more checks
> > (still no unlinked files) and dumps some more information including
> > structures connections (cr_pos_*)
> > 
> > Dumping pids in under thinking because in OpenVZ pids are saved as
> > numbers due to CLONE_NEWPID is not allowed in container. In presense
> > of multiple CLONE_NEWPID levels this must present a big problem. Looks
> > like there is now way to not dump pids as separate object.
> > 
> > As result, struct cr_image_pid is variable-sized, don't know how this will
> > play later.
> > 
> > Also, pid refcount check for external pointers is busted right now,
> > because /proc inode pins struct pid, so there is almost always refcount
> > vs ->o_count mismatch.
> > 
> > No restore yet. ;-)
> 
> Hi Alexey,
> 
> thanks for posting this.  Of course there are some predictable responses
> (I like the simplicity of pure in-kernel, Dave will not :) but this
> needs to be posted to make us talk about it.
> 
> A few more comments that came to me while looking it over:
> 
> 1. cap_sys_admin check is unfortunate.  In discussions about Oren's
> patchset we've agreed that not having that check from the outset forces
> us to consider security with each new patch and feature, which is a good
> thing.

Removing CAP_SYS_ADMIN on restore?

> 2. if any tasks being checkpointed are frozen, checkpoint has the
> side effect of thawing them, right?

Haven't tried, but should be a bug, yes. It will be "thaw or kill"
depending on "flags".

> 3. wrt pids, i guess what you really want is to store the pids from
> init_tsk's level down to the task's lowest pid, right?  Then you
> manually set each of those on restart?  Any higher pids of course
> don't matter.

Yes, numbers are really meant to be from init_tsk level.

> 4. do you have any thoughts on what to do with the mntns info at
> restart?  Will you try to detect mounts which need to be re-created?
> How?

Haven't thought, but it will be tricky for sure :^)

> 5. Since you're always setting f_pos, this won't work straight over
> a pipe?  Do you figure that's just not a worthwhile feature?

So far there were no loops when dumping data structures, but I _think_
there will be some, so seeking over dumpfile would be inevitable.

> Were you saying (in response to Dave) that you're having private
> discussions about whether to pursue posting this as an alternative
> to Oren's patchset?  If so, any updates on those discussions?

Right now, no.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-03-01 20:56 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 17:07 [RFC v13][PATCH 00/14] Kernel based checkpoint/restart Oren Laadan
2009-01-27 17:07 ` [RFC v13][PATCH 01/14] Create syscalls: sys_checkpoint, sys_restart Oren Laadan
2009-01-27 17:20   ` Randy Dunlap
2009-01-27 17:08 ` [RFC v13][PATCH 02/14] Checkpoint/restart: initial documentation Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 03/14] Make file_pos_read/write() public Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 04/14] General infrastructure for checkpoint restart Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 05/14] x86 support for checkpoint/restart Oren Laadan
2009-02-24  7:47   ` Nathan Lynch
     [not found]     ` <20090224014739.1b82fc35-4v5LP+xe+1byhTdZtsIeww@public.gmane.org>
2009-02-24 16:06       ` Dave Hansen
2009-03-18  7:21     ` Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 06/14] Dump memory address space Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 07/14] Restore " Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 08/14] Infrastructure for shared objects Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 09/14] Dump open file descriptors Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 11/14] External checkpoint of a task other than ourself Oren Laadan
     [not found] ` <1233076092-8660-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-01-27 17:08   ` [RFC v13][PATCH 10/14] Restore open file descriprtors Oren Laadan
2009-01-27 17:08   ` [RFC v13][PATCH 12/14] Track in-kernel when we expect checkpoint/restart to work Oren Laadan
2009-01-27 17:08   ` [RFC v13][PATCH 14/14] Restart multiple processes Oren Laadan
2009-01-27 17:08 ` [RFC v13][PATCH 13/14] Checkpoint " Oren Laadan
2009-02-10 17:05 ` [RFC v13][PATCH 00/14] Kernel based checkpoint/restart Dave Hansen
2009-02-11 22:14   ` Andrew Morton
2009-02-12  9:17     ` Ingo Molnar
     [not found]       ` <20090212091721.GB1888-X9Un+BFzKDI@public.gmane.org>
2009-02-12 18:11         ` Dave Hansen
2009-02-12 20:48           ` Serge E. Hallyn
2009-02-13 10:20           ` Ingo Molnar
2009-02-12 18:11     ` Dave Hansen
2009-02-12 19:30       ` Matt Mackall
2009-02-12 19:42         ` Andrew Morton
2009-02-12 21:51           ` What can OpenVZ do? Dave Hansen
2009-02-12 22:10             ` Andrew Morton
2009-02-12 23:04               ` How much of a mess does OpenVZ make? ;) Was: " Dave Hansen
2009-02-26 15:57                 ` Alexey Dobriyan
2009-03-10 21:53                   ` Alexey Dobriyan
2009-03-10 23:28                     ` Serge E. Hallyn
2009-03-11  8:26                     ` Cedric Le Goater
2009-03-12 14:53                       ` Serge E. Hallyn
2009-03-12 21:01                         ` Greg Kurz
2009-03-12 21:21                           ` Serge E. Hallyn
2009-03-13  4:29                             ` Ying Han
2009-03-13  5:34                               ` Sukadev Bhattiprolu
     [not found]                                 ` <20090313053458.GA28833-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-03-13  6:19                                   ` Ying Han
2009-03-13 17:27                                 ` Linus Torvalds
2009-03-13 19:02                                   ` Serge E. Hallyn
     [not found]                                   ` <alpine.LFD.2.00.0903131018390.3940-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-03-13 19:35                                     ` Alexey Dobriyan
2009-03-13 21:01                                       ` Linus Torvalds
2009-03-13 21:51                                         ` Dave Hansen
2009-03-13 22:15                                           ` Oren Laadan
2009-03-14  0:27                                             ` Eric W. Biederman
2009-03-14  8:12                                               ` Ingo Molnar
2009-03-16 22:33                                                 ` Kevin Fox
2009-03-19 21:19                                                 ` Eric W. Biederman
     [not found]                                         ` <alpine.LFD.2.00.0903131401070.3940-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-03-14  0:20                                           ` Alexey Dobriyan
2009-03-14  8:25                                             ` Ingo Molnar
     [not found]                                               ` <20090314082532.GB16436-X9Un+BFzKDI@public.gmane.org>
2009-03-14 17:11                                                 ` Joseph Ruscio
2009-03-16  6:01                                               ` Oren Laadan
2009-03-13 20:48                                   ` Mike Waychison
2009-03-13 22:35                                     ` Oren Laadan
2009-03-18 18:54                                       ` Mike Waychison
2009-03-18 19:04                                         ` Oren Laadan
     [not found]                               ` <604427e00903122129y37ad791aq5fe7ef2552415da9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-13 15:27                                 ` Cedric Le Goater
     [not found]                                   ` <49BA7B60.60607-GANU6spQydw@public.gmane.org>
2009-03-13 17:11                                     ` Greg Kurz
2009-03-13 17:37                               ` Serge E. Hallyn
2009-03-13 15:47                         ` Cedric Le Goater
2009-03-13 16:35                           ` Serge E. Hallyn
2009-03-13 16:53                             ` Cedric Le Goater
2009-02-26 16:27                 ` Alexey Dobriyan
2009-02-26 17:33                   ` Ingo Molnar
     [not found]                     ` <20090226173302.GB29439-X9Un+BFzKDI@public.gmane.org>
2009-02-26 18:30                       ` Greg Kurz
2009-02-26 22:17                         ` Alexey Dobriyan
     [not found]                           ` <20090226221709.GA2924-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
2009-02-27  9:19                             ` Greg Kurz
2009-02-27 10:53                               ` Alexey Dobriyan
2009-02-27 14:33                                 ` Cedric Le Goater
2009-02-27  9:36                           ` Cedric Le Goater
2009-02-26 22:31                       ` Alexey Dobriyan
2009-02-27  9:03                         ` Ingo Molnar
2009-02-27  9:19                           ` Andrew Morton
2009-02-27 10:57                             ` Alexey Dobriyan
     [not found]                           ` <20090227090323.GC16211-X9Un+BFzKDI@public.gmane.org>
2009-02-27  9:22                             ` Andrew Morton
2009-02-27 10:59                               ` Alexey Dobriyan
2009-02-27 16:14                         ` Dave Hansen
2009-02-27 21:57                           ` Alexey Dobriyan
     [not found]                             ` <20090227215749.GA3453-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
2009-02-27 21:54                               ` Dave Hansen
     [not found]                         ` <20090226223112.GA2939-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
2009-03-01  1:33                           ` Alexey Dobriyan
     [not found]                             ` <20090301013304.GA2428-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
2009-03-01 20:02                               ` Serge E. Hallyn
     [not found]                                 ` <20090301200231.GA25276-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-03-01 20:56                                   ` Alexey Dobriyan [this message]
2009-03-01 22:21                                     ` Serge E. Hallyn
2009-03-03 16:17                                     ` Cedric Le Goater
2009-03-03 18:28                                       ` Serge E. Hallyn
2009-02-13 10:53               ` Ingo Molnar
     [not found]                 ` <20090213105302.GC4608-X9Un+BFzKDI@public.gmane.org>
2009-02-16 20:51                   ` Dave Hansen
2009-02-17 22:23                     ` Ingo Molnar
     [not found]                       ` <20090217222319.GA10546-X9Un+BFzKDI@public.gmane.org>
2009-02-17 22:30                         ` Dave Hansen
2009-02-18  0:32                           ` Ingo Molnar
2009-02-18  0:40                             ` Dave Hansen
2009-02-18  5:11                               ` Alexey Dobriyan
2009-02-18 18:16                                 ` Ingo Molnar
     [not found]                                   ` <20090218181644.GD19995-X9Un+BFzKDI@public.gmane.org>
2009-02-18 21:27                                     ` Dave Hansen
2009-02-18 23:15                                       ` Ingo Molnar
2009-02-19 19:06                                         ` Banning checkpoint (was: Re: What can OpenVZ do?) Alexey Dobriyan
2009-02-19 19:11                                           ` Dave Hansen
2009-02-24  4:47                                             ` Alexey Dobriyan
     [not found]                                               ` <20090224044752.GB3202-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
2009-02-24  5:11                                                 ` Dave Hansen
2009-02-24 15:43                                                   ` Serge E. Hallyn
2009-02-24 20:09                                                   ` Alexey Dobriyan
2009-02-12 22:17             ` What can OpenVZ do? Alexey Dobriyan
2009-02-13 10:27             ` Ingo Molnar
2009-02-13 11:32               ` Alexey Dobriyan
2009-02-13 11:45                 ` Ingo Molnar
2009-02-13 22:28                   ` Alexey Dobriyan
2009-03-14  0:04                     ` Eric W. Biederman
2009-03-14  0:26                       ` Serge E. Hallyn
2009-02-12 22:57         ` [RFC v13][PATCH 00/14] Kernel based checkpoint/restart Dave Hansen
2009-02-12 23:05           ` Matt Mackall
2009-02-12 23:13             ` Dave Hansen
2009-02-13 23:28       ` Andrew Morton
2009-02-14 23:08         ` Ingo Molnar
2009-02-14 23:31           ` Andrew Morton
2009-02-14 23:50             ` Ingo Molnar
     [not found]         ` <20090213152836.0fbbfa7d.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-02-16 17:37           ` Dave Hansen
2009-03-13  2:45         ` Oren Laadan
2009-03-13  3:57           ` 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=20090301205659.GA7276@x200.localdomain \
    --to=adobriyan-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=mingo-X9Un+BFzKDI@public.gmane.org \
    --cc=mpm-VDJrAJ4Gl5ZBDgjK7y7TUQ@public.gmane.org \
    --cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    --cc=xemul-GEFAQzZX7r8dnm+yROfE0A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).