From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [RFC][PATCH 0/4] kernel-based checkpoint restart Date: Fri, 8 Aug 2008 11:25:12 +0200 Message-ID: <200808081125.12706.arnd@arndb.de> References: <20080807224033.FFB3A2C1@kernel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080807224033.FFB3A2C1@kernel> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Dave Hansen Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Theodore Tso , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: containers.vger.kernel.org On Friday 08 August 2008, Dave Hansen wrote: > These patches are from Oren Laaden. I've refactored them > a bit to make them a wee bit more reviewable. I think this > separates out the per-arch bits pretty well. It should also > be at least build-bisetable. Cool stuff > ============================== ckpt.c ================================ > > #define _GNU_SOURCE /* or _BSD_SOURCE or _SVID_SOURCE */ > > #include > #include > #include > #include > #include > #include > #include Note that asm/unistd_32.h is not portable, you should use asm/unistd.h in the example. > pid_t pid = getpid(); > int ret; > > ret = syscall(__NR_checkpoint, pid, STDOUT_FILENO, 0); Interface-wise, I would consider checkpointing yourself signficantly different from checkpointing some other thread. If checkpointing yourself is the common case, it probably makes sense to allow passing of pid=0 for this. Arnd <><