Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751162AbWAQOu6 (ORCPT ); Tue, 17 Jan 2006 09:50:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751005AbWAQOuw (ORCPT ); Tue, 17 Jan 2006 09:50:52 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:36834 "EHLO e1.ny.us.ibm.com") by vger.kernel.org with ESMTP id S1751122AbWAQOua (ORCPT ); Tue, 17 Jan 2006 09:50:30 -0500 Message-Id: <20060117143328.520447000@sergelap> References: <20060117143258.150807000@sergelap> Date: Tue, 17 Jan 2006 08:33:24 -0600 From: Serge Hallyn To: linux-kernel@vger.kernel.org Cc: Hubertus Franke , Cedric Le Goater , Dave Hansen , Serge E Hallyn Subject: RFC [patch 26/34] PID Virtualization Documentation Content-Disposition: inline; filename=G0-documentation.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2536 Lines: 77 First (incomplete) attempt of documentation Signed-off-by: Hubertus Franke --- containers.txt | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 64 insertions(+) Index: linux-2.6.15/Documentation/containers.txt =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6.15/Documentation/containers.txt 2006-01-17 08:37:07.000000000 -0500 @@ -0,0 +1,64 @@ +This document describes the basics of the container + +Hubertus Franke +Serge E Hallyn +Cedric Legoater + +Applications and associated processes can be containerized into +"isolated" soft partitions. The goal is to make containers +transparently migratable. To do so certain resources identifiers +need to be virtualized. +These includes + - pids, gids, + - SysV ids + - procfs +Only resource belonging to a container can be accessed within +the container. + +A "container" is created through a helper program , +that is supplied separately. +A process moves itself to a container by writing +the name of the container to create to /proc/container. +Doing so makes the calling process the pseudo init process +of the container. + + +For example "contexe -j2 /bin/bash" spawns a bash within +a new container and make the contexe process +the containers virtual initproc. + + +PID-VIRTUALIZATION: +------------------- + +Let Process be the currently running process ( e.g. bash with pid 913 ) +Each container has an associated pidspace id associated. Each pidspace +id is managed like the standard pid range in linux. + +We obtain the following tree, where denotes the +internal pid which is obtained by bitmasking. + +A some older bash < 0 | 913 > + | + \/ +B == contexe == < 0 | 1087 > ( also container->init_proc := A + container->init_pid := 1087 + | + \/ +C == /bin/bash == < 1 | 2 > + + +let's define the results here we are expecting. + +C in context of B: vpid = 2 +B in context of C: vpid = 1 + +B in context of A: vpid = pid = 1087 +C in context of A: vpid = pid = < 1 | 2 > + +A in context of B: vpid = pid = 913 +A in context of C: vpid = -1 + +< More to Follow > + + -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/