From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 25 02:26:14 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 89A6E16A4CE for ; Tue, 25 Jan 2005 02:26:14 +0000 (GMT) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3103443D1D for ; Tue, 25 Jan 2005 02:26:14 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 0372F3F413; Tue, 25 Jan 2005 00:26:13 -0200 (BRST) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 62333-02; Tue, 25 Jan 2005 00:25:55 -0200 (BRST) Received: from [200.217.142.65] (unknown [200.217.142.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id DC36C3F410; Tue, 25 Jan 2005 00:25:52 -0200 (BRST) Message-ID: <41F5AE36.4090107@jonny.eng.br> Date: Tue, 25 Jan 2005 00:25:58 -0200 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce M Simpson References: <86pszu639o.fsf@borg.borderworlds.dk> <86brbe6052.fsf@borg.borderworlds.dk> <200501242240.j0OMeIXP043763@apollo.backplane.com> <41F59242.7090900@jonny.eng.br> <41F5A2DE.5000306@gamersimpact.com> <20050125014935.GD47638@dhcp120.icir.org> In-Reply-To: <20050125014935.GD47638@dhcp120.icir.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at coe.ufrj.br cc: Ryan Sommers cc: hackers@freebsd.org Subject: Re: FreeBSD disk hibernation - Was: 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 02:26:14 -0000 Bruce M Simpson wrote: > On Mon, Jan 24, 2005 at 07:37:34PM -0600, Ryan Sommers wrote: > >>My little knowledge on this subject aside. I'd love to have full >>suspend/resume functionality. It'd make my life as a mobile freebsd user >>much much easier. However, I wouldn't want it at the expense of every >>kernel. It would need to be something completely modular. > > > I think what we're also looking at is aborting any pending bus-mastering > transactions. This could probably be done as a part of the newbus > suspend/resume routines for bus and device drivers, but it also means > that the other entry points need to be able to deal with the carpet > being dragged out from under them like this. As I said, the first step should be to enter a pre-suspend state, where only hard disk devices should be kept alive. All other devices should be sleeping then, and so there will be no pending requests. > In the case of a networking driver, particularly Ethernet, things are > somewhat easier, and the more help you get from the hardware the better; > but some cards like those based around ATM SARS just plain aren't designed > to deal with the carpet being dragged out - they expect to keep rolling > through their descriptor rings, segmenting and transmitting what they see. The carpet will not be dragged out. The card wil be specifically shut down before this. ;-) Of course, a techo-nerd-maniac could devise some form of network hibernating, or a NFS based hibernate file. Just like crash dump, I don't think this is possible or even necessary. > If we could take a clean subsystem-by-subsystem approach to marshaling > kernel state to disk, that would be good. What gives me particular pain > here is dealing with things like the filesystem. How does one deal with > open files, etc, with pending I/O? There's no need to deal with it! Just save the whole kernel core! Jonny -- João Carlos Mendes Luís - Networking Engineer - jonny@jonny.eng.br