From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265690AbUABXHf (ORCPT ); Fri, 2 Jan 2004 18:07:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265692AbUABXHe (ORCPT ); Fri, 2 Jan 2004 18:07:34 -0500 Received: from gprs214-81.eurotel.cz ([160.218.214.81]:9102 "EHLO amd.ucw.cz") by vger.kernel.org with ESMTP id S265690AbUABXHW (ORCPT ); Fri, 2 Jan 2004 18:07:22 -0500 Date: Fri, 2 Jan 2004 23:43:34 +0100 From: Pavel Machek To: kernel list , Rusty trivial patch monkey Russell , Andrew Morton , Patrick Mochel Subject: Trivial swsusp/sleep fixes Message-ID: <20040102224334.GA446@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi! This kills outdated docs, and adds some helpfull docs about video issues with suspend. Please apply, Pavel PS: Patrick, are you there? I have not heard from you for pretty long... %patch Index: linux.new/Documentation/power/swsusp.txt =================================================================== --- linux.new.orig/Documentation/power/swsusp.txt 2003-12-25 13:28:50.000000000 +0100 +++ linux.new/Documentation/power/swsusp.txt 2003-12-25 13:29:06.000000000 +0100 @@ -17,13 +17,30 @@ You need to append resume=/dev/your_swap_partition to kernel command line. Then you suspend by echo 4 > /proc/acpi/sleep. -[Notice. Rest docs is pretty outdated (see date!) It should be safe to -use swsusp on ext3/reiserfs these days.] +Pavel's unreliable guide to swsusp mess +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are currently two versions of swap suspend in the kernel, the old +"Pavel's" version in kernel/power/swsusp.c and the new "Patrick's" +version in kernel/power/pmdisk.c. They provide the same functionality; +the old version looks ugly but was tested, while the new version looks +nicer but did not receive so much testing. echo 4 > /proc/acpi/sleep +calls the old version, echo disk > /sys/power/state calls the new one. + +[In the future, when the new version is stable enough, two things can +happen: + +* the new version is moved into swsusp.c, and swsusp is renamed to swap + suspend (Pavel prefers this) + +* pmdisk is kept as is and swsusp.c is removed from the kernel] + Article about goals and implementation of Software Suspend for Linux +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Author: G‚ábor Kuti -Last revised: 2002-04-08 +Last revised: 2003-10-20 by Pavel Machek Idea and goals to achieve @@ -36,84 +53,23 @@ interrupt our programs so processes that are calculating something for a long time shouldn't need to be written interruptible. -On desk machines the power saving function isn't as important as it is in -laptops but we really may benefit from the second one. Nowadays the number of -desk machines supporting suspend function in their APM is going up but there -are (and there will still be for a long time) machines that don't even support -APM of any kind. On the other hand it is reported that using APM's suspend -some irqs (e.g. ATA disk irq) is lost and it is annoying for the user until -the Linux kernel resets the device. - -So I started thinking about implementing Software Suspend which doesn't need -any APM support and - since it uses pretty near only high-level routines - is -supposed to be architecture independent code. - Using the code -The code is experimental right now - testers, extra eyes are welcome. To -compile this support into the kernel, you need CONFIG_EXPERIMENTAL, -and then CONFIG_SOFTWARE_SUSPEND in menu General Setup to be enabled. It -cannot be used as a module and I don't think it will ever be needed. - -You have two ways to use this code. The first one is if you've compiled in -sysrq support then you may press Sysrq-D to request suspend. The other way -is with a patched SysVinit (my patch is against 2.76 and available at my -home page). You might call 'swsusp' or 'shutdown -z