From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 25 19:48:59 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6087A16A4CF for ; Tue, 25 Jan 2005 19:48:59 +0000 (GMT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8B2A43D2F for ; Tue, 25 Jan 2005 19:48:56 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) j0PJmq0e048848; Tue, 25 Jan 2005 11:48:52 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id j0PJmpYG048845; Tue, 25 Jan 2005 11:48:51 -0800 (PST) (envelope-from dillon) Date: Tue, 25 Jan 2005 11:48:51 -0800 (PST) From: Matthew Dillon Message-Id: <200501251948.j0PJmpYG048845@apollo.backplane.com> To: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= References: <86pszu639o.fsf@borg.borderworlds.dk> <86brbe6052.fsf@borg.borderworlds.dk> <200501242240.j0OMeIXP043763@apollo.backplane.com> <41F59242.7090900@jonny.eng.br> cc: ctodd@chrismiller.com cc: hackers@freebsd.org cc: Christian Laursen cc: Dominic Marks Subject: Re: Resuming from a crashdump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2005 19:48:59 -0000 Well, I don't want do disuade you from trying, but I think you are seriously underestimating the effort required to restore device state. You basically would either have to make all device drivers support a new hibernation/restore API (because it is not really possible to restore a device driver based on a dump), or you would need to implement some higher level utility code (e.g. scripts and such) to try to record and restore the state at a higher level, such as for network interfaces, and not allow any restored processes to run until that's done. Either way it would get messy very quickly. Also, if the machine has a lot of memory it could take longer to save and restore then to reboot from scratch. A typical laptop HD is ~30 MB/sec. If your laptop has 512MB then it would take 16 seconds to go into hibernation mode, and 16 seconds to come out of, plus BIOS and loader overhead. I think it would probably be more realistic to persue a process save/restore rather then a kernel save/restore. The overhead is going to be the disk I/O anyway and that seems to be about the same either way (maybe less for a process restore), plus you can at least demand-load the process restore. -Matt