From owner-freebsd-current@FreeBSD.ORG Thu Jun 26 10:08:27 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A06337B401 for ; Thu, 26 Jun 2003 10:08:27 -0700 (PDT) Received: from ns3.safety.net (ns3.safety.net [216.40.201.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB84F43F75 for ; Thu, 26 Jun 2003 10:08:26 -0700 (PDT) (envelope-from cbiffle@safety.net) Received: from localhost (rs.rackshack.net.safety.net [216.40.201.32]) h5QH8PCk005542 for ; Thu, 26 Jun 2003 10:08:26 -0700 From: "Cliff L. Biffle" To: freebsd-current@freebsd.org Date: Thu, 26 Jun 2003 10:08:24 -0700 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306261008.24051.cbiffle@safety.net> Subject: Software suspend? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 17:08:27 -0000 Have we considered implementing software suspend? I've been using Gentoo on my laptops (as nobody else seems to be able to reproduce my BSD bugs on them) and have been playing with the Linux software suspend facilities. It's kind of a neat trick; basically they spawn a process that forces everything else to page out as much as it can. When simply paging the processes out is no longer possible, it stops the processes and writes their remaining memory into swap manually. It then leaves some sort of signature on the swap so that the kernel, on next boot, restores the old memory space instead of firing up init and whatnot. It's not quite perfect (for example, I don't believe it saves kernel space) but it seems to work amazingly well for such a hack. :-) I admit to being essentially unfamiliar with the innards of the FreeBSD kernel and VM, but I've worked with the Linux patches (ugghhhh...I miss running FreeBSD and not having to manually patch my kernel) and they're amazingly simple, given their function. How hard do y'all think this would be? Is anyone else interested in this? In Linux it basically lets us work around broken ACPI suspend routines. -Cliff L. Biffle