==================================
ϡ
linux-2.6.14/Documentation/power/swsusp.txt 
Ǥ
Ρ JF ץ < http://www.linux.or.jp/JF/ >
  2005/12/20
: Gabor Kuti
         Pavel Machek <pavel at suse dot cz>
  Hiroshi.Suzuki < setter at reset dot jp >
  Masanori Kobayasi  <zap03216 at nifty dot ne dot jp>
	Teruo KATOH  <t-katoh at po dot iijnet dot or dot jp>
	TAKEI Nobumitsu  <takei at webmasters dot gr dot jp>
==================================

Some warnings, first.

ϤˡĤޤ

 * BIG FAT WARNING *********************************************************
 *
 * If you touch anything on disk between suspend and resume...
 *				...kiss your data goodbye.
 *
 * If you do resume from initrd after your filesystems are mounted...
 *                              ...bye bye root partition.
 *                      [this is actually same case as above]
 *
 * If you have unsupported (*) devices using DMA, you may have some
 * problems. If your disk driver does not support suspend... (IDE does),
 * it may cause some problems, too. If you change kernel command line
 * between suspend and resume, it may do something wrong. If you change
 * your hardware while system is suspended... well, it was not good idea;
 * but it will probably only crash.
 *
 * (*) suspend/resume support is needed to make it safe.

 * ȤƤפʷٹ *********************************************************
 *
 * ڥɤδ֤ǡǥβ˼Ĥʤ...
 *				...椯ǡ˸Ť
 *
 * ȤΥե륷ƥबޥȤ줿 initrd ʤ...
 *				...롼ȥѡƥ衢褦ʤ顣
 *				   [ϼºݡ嵭ƱǤ]
 *
 * DMA ȤݡȤƤʤ (*) ǥХ򤪻ʤ顢
 * ꤬뤫Τޤ
 * ȤΥǥɥ饤Фڥɤ򥵥ݡȤƤʤƤ...
 * (IDE ϥݡȤƤޤ)⤷ޤ
 * ڥɤǥͥ륳ޥɥ饤ѹʤ顢Զ礬ȯ
 * ⤷ޤ
 * ƥबڥˤȤΥϡɥ괹ʤ...
 * ɤȤǤϤޤ󤬡餯å夹ǺѤǤ礦
 *
 * (*) ڥ/ΥݡȤϡ˹ԤɬפǤ

You need to append resume=/dev/your_swap_partition to kernel command
line. Then you suspend by

ͥ륳ޥɥ饤ˡresume=/dev/your_swap_partition ɲäɬפ
ޤθ塢Υޥɤǥڥɤޤ

echo shutdown > /sys/power/disk; echo disk > /sys/power/state

. If you feel ACPI works pretty well on your system, you might try

ȤΥƥ ACPI ưȻפʤ顢Υޥɤ
ƤߤƲ

echo platform > /sys/power/disk; echo disk > /sys/power/state

Encrypted suspend image:
------------------------
If you want to store your suspend image encrypted with a temporary
key to prevent data gathering after resume you must compile
crypto and the aes algorithm into the kernel - modules won't work
as they cannot be loaded at resume time.

Ź沽ڥɥ᡼:
------------------------
 (ڥɥ᡼) ǡɤᡢǰŹ沽줿
ڥɥ᡼¸ʤ顢crypto ȡaes 르ꥺ
ͥȤ߹ǥѥ뤷ʤФʤޤ
⥸塼ˤ˥ɤǤʤΤưޤ

Article about goals and implementation of Software Suspend for Linux

Linux ѥեȥڥɤμ˴ؤ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Author: Gabor Kuti
Last revised: 2003-10-20 by Pavel Machek

: Gabor Kuti
ǽ: 2003-10-20 Pavel Machek

Idea and goals to achieve

ǰã٤ǽŪ

Nowadays it is common in several laptops that they have a suspend button. It
saves the state of the machine to a filesystem or to a partition and switches
to standby mode. Later resuming the machine the saved state is loaded back to
ram and the machine can continue its work. It has two real benefits. First we
save ourselves the time machine goes down and later boots up, energy costs
are real high when running from batteries. The other gain is that we don't
have to interrupt our programs so processes that are calculating something
for a long time shouldn't need to be written interruptible.

Ǥϡɤʥåץȥå (Ρȥѥ) ˤ⡢ڥɥܥ󤬤Τ
̤Ǥϡޥξ֤ե륷ƥࡢޤϥѡƥ¸
Х⡼ɤڤؤޤȤǥޥȤ¸줿
ϡRAM ɤᤵ졢ޥϽ³ޤˤ 2ĤμŪ
ޤ1ĤϡޥߤơǵưȤˤ֤ȡӤư
Ρ¤˹ϷǤޤ⤦1Ĥϡץ
ɬפʤΤǡĹֲ׻ƤץǤǤ褦˺ɬ
פʤȤǤ

swsusp saves the state of the machine into active swaps and then reboots or
powerdowns.  You must explicitly specify the swap partition to resume from with
``resume='' kernel option. If signature is found it loads and restores saved
state. If the option ``noresume'' is specified as a boot parameter, it skips
the resuming.

swsusp ϡƯΥåפ˥ޥξ֤¸ΤȤǡƵưޤ
Ÿڤޤ˻Ȥåץѡƥ``resume=''
ͥ륪ץˤŪ˻ꤹɬפޤ
(ͥ) εҤ򸫤Ĥ顢ɤ߹ߡ¸줿֤ޤ
ưѥ᡼ ``noresume'' ץ󤬻ꤵ줿硢ưϹԤޤ


In the meantime while the system is suspended you should not add/remove any
of the hardware, write to the filesystems, etc.

ƥॵڥˤϡϡɥդ䡢ե륷ƥؤν
ߤʤɤԤäƤϤޤ

Sleep states summary

꡼׾֤
====================

There are three different interfaces you can use, /proc/acpi should
work like this:

Ѳǽ3Ĥΰۤʤ륤󥿥եꡢ/proc/acpi ϡΤ褦ưϤ
Ǥ:(: /proc/acpi/sleep ϡ2.6.13 侩ˤʤäΤǡͥ
CONFIG_ACPI_SLEEP_PROC_SLEEP=y ˤʤȻȤޤ)

In a really perfect world:
echo 1 > /proc/acpi/sleep       # for standby
echo 2 > /proc/acpi/sleep       # for suspend to ram
echo 3 > /proc/acpi/sleep       # for suspend to ram, but with more power
				  conservative
echo 4 > /proc/acpi/sleep       # for suspend to disk
echo 5 > /proc/acpi/sleep       # for shutdown unfriendly the system

and perhaps
echo 4b > /proc/acpi/sleep      # for suspend to disk via s4bios

˴ˤ (꤬ʤ):
echo 1 > /proc/acpi/sleep       # Х
echo 2 > /proc/acpi/sleep       # RAM ¸륵ڥ (STR)
echo 3 > /proc/acpi/sleep       # RAM ¸륵ڥ (STR)Ǥ
				  Ÿ¸ޤ
echo 4 > /proc/acpi/sleep       # ǥ¸륵ڥ (STD)
echo 5 > /proc/acpi/sleep       # ƥͧŪʥåȥ

⤿֤ưǤ礦
echo 4b > /proc/acpi/sleep      # s4bios ͳǡǥ¸륵ڥ
				  (STD)


Frequently Asked Questions

֤ʹ (FAQ)
==========================

Q: well, suspending a server is IMHO a really stupid thing,
but... (Diego Zuccato):

Q: 䤬פˡФ򥵥ڥɤΤϼ¤ＱʤȤʤΤǤ...
(Diego Zuccato ):

A: You bought new UPS for your server. How do you install it without
bringing machine down? Suspend to disk, rearrange power cables,
resume.

A: ʤϡѤ˿ UPS 㤤ޤɤΤ褦ˤơ
ޥŸȤ֤ޤ
ǥ˥ڥɤơŸ֥դθޤ礦

You have your server on UPS. Power died, and UPS is indicating 30
seconds to failure. What do you do? Suspend to disk.

UPS ³Ƥ륵Фޤ
ŸUPS Ӥڤޤ30äǤ뤳ȤɽƤޤ
ʤϤɤޤ ǥ˥ڥɤޤ礦

Q: Maybe I'm missing something, but why don't the regular I/O paths work?

Q: 䤬ְ㤨Τޤ󤬡ʤɸŪ I/O ηϩƯʤΤ


A: We do use the regular I/O paths. However we cannot restore the data
to its original location as we load it. That would create an
inconsistent kernel state which would certainly result in an oops.
Instead, we load the image into unused memory and then atomically copy
it back to it original location. This implies, of course, a maximum
image size of half the amount of memory.

A: ɸŪ I/O ηϩ˻ȤäƤޤʤ顢ñ˥ɤ褦
ǡ򡢸ξ᤹ȤϤǤޤ󡣤Τ褦ʤȤ򤹤ȡ̷⤷
ͥξ֤Ȥʤꡢμ¤Ǥ礦ΤˡȤäƤ
˥᡼ɤȤǡȥߥå˸ξإԡޤ
ˡǤϡ祤᡼ϡΤȾʬˤʤޤ

There are two solutions to this:

ФƤϡ2Ĥβˡޤ:

* require half of memory to be free during suspend. That way you can
read "new" data onto free spots, then cli and copy

* ڥɤ֤˥ȾʬƤ뤳Ȥ׵᤹롣ˡǤϡ
ɤ߹ "" ǡƤ˽񤭹ळȤǤΤȤ
ߤػ (cli) ƥԡޤ

* assume we had special "polling" ide driver that only uses memory
between 0-640KB. That way, I'd have to make sure that 0-640KB is free
during suspending, but otherwise it would work...

* 0-640kB ΥȤ̤ "ݡ" IDE ɥ饤Ф
ꤷޤ
ˡǤϡڥ桢0-640kB ƤȤΤʤФʤޤ
ʤ꤫ǤʤƤưǤ礦...

suspend2 shares this fundamental limitation, but does not include user
data and disk caches into "used memory" by saving them in
advance. That means that the limitation goes away in practice.

suspend2 ⡢κŪޤ桼ǡȥǥ
åä¸ƤΤǡ "ѺѤߥ"  
ޤޤ
ˤꡢ¾塢Τ褦ϤʤʤȤȤǤ

Q: Does linux support ACPI S4?

Q: Linux ϡACPI S4 򥵥ݡȤޤ

A: Yes. That's what echo platform > /sys/power/disk does.

A: Ϥecho platform > /sys/power/disk ǹԤޤ

Q: What is 'suspend2'?

Q: 'suspend2' ȤϲǤ

A: suspend2 is 'Software Suspend 2', a forked implementation of
suspend-to-disk which is available as separate patches for 2.4 and 2.6
kernels from swsusp.sourceforge.net. It includes support for SMP, 4GB
highmem and preemption. It also has a extensible architecture that
allows for arbitrary transformations on the image (compression,
encryption) and arbitrary backends for writing the image (eg to swap
or an NFS share[Work In Progress]). Questions regarding suspend2
should be sent to the mailing list available through the suspend2
website, and not to the Linux Kernel Mailing List. We are working
toward merging suspend2 into the mainline kernel.

A: suspend2 ϡ'եȥڥ 2' ǡǥؤΥڥɤ
եǤswsusp.sourceforge.net ǡ2.4  2.6ϥͥѤθ
ΥѥåȤǤޤsuspend2 ˤ SMP4GB ̥ꡢץꥨץ
ΥݡȤޤޤޤϡ᡼ǤǤդѴ (̡Ź沽)ӥ
᡼񤭹िǤդΥХå (㤨Сswap 䡢NFS ͭ[]) 
ѤǤ褦ˤĥǽʹ¤äƤޤ
suspend2 Ϣμϡsuspend2 ֥ȷͳѤǤ롢᡼󥰥ꥹ
äƤLinux ͥ᡼󥰥ꥹȤˤʤǤ
ãϡsuspend2 򥫡ͥή礹ǺȤƤޤ

Q: A kernel thread must voluntarily freeze itself (call 'refrigerator').
I found some kernel threads that don't do it, and they don't freeze
so the system can't sleep. Is this a known behavior?

Q: ͥ륹åɤȤΤϼȯŪ˼Ȥ ('refrigerator' ƤӽФ) 
ʤФʤޤ󡣤Τ褦ưʤĤΥͥ륹åɤȯޤ
餬ߤʤᡢƥबٻߤޤ󡣤ϡΤưǤ

A: All such kernel threads need to be fixed, one by one. Select the
place where the thread is safe to be frozen (no kernel semaphores
should be held at that point and it must be safe to sleep there), and
add:

A: ٤ƤΤΤ褦ʥͥ륹åɤϤҤȤĤҤȤĽɬפǤåɤ
ߤ (ξݻʤФʤʤͥ륻ޥեʤ
ǤεٻߤϰǤʤФʤޤ) 򤷡Υɤɲäޤ

       try_to_freeze();

If the thread is needed for writing the image to storage, you should
instead set the PF_NOFREEZE process flag when creating the thread (and
be very careful).

åɤ᡼ε֤ؤν񤭹ߤɬפʤ顢åɤȤ
ˡPF_NOFREEZE ե饰 (嵭ɤ) ˥åȤʤФʤޤ
(ٿդϤäƤ)

Q: What is the difference between between "platform", "shutdown" and
"firmware" in /sys/power/disk?

Q: /sys/power/disk Ρ"platform", "shutdown", "firmware" ΰ㤤ϡ

A:

shutdown: save state in linux, then tell bios to powerdown

platform: save state in linux, then tell bios to powerdown and blink
          "suspended led"

firmware: tell bios to save state itself [needs BIOS-specific suspend
	  partition, and has very little to do with swsusp]

"platform" is actually right thing to do, but "shutdown" is most
reliable.

A:

shutdown: Linux ξ֤¸ΤȤǡBIOS ŸȤ褦ؼޤ

platform: Linux ξ֤¸ΤȤǡŸȤ
          " ȯ" Ǥ褦BIOS ˻ؼޤ

firmware: ʬȤǾ֤¸褦BIOS ˻ؼޤ [BIOS λꤹ롢
ڥѥѡƥɬפǡswsusp ȤȤưΤϤ鷺Ǥ]

"platform" ºݤˤ꤫Ǥ"shutdown" äȤꤷƤޤ

Q: I do not understand why you have such strong objections to idea of
selective suspend.

Q: ʤʤŪڥɤιͤˤΤ褦˶ȿФƤΤǤޤ
(: Ūڥ = ǥХ򤷤ƥڥɤ뵡ǽ)

A: Do selective suspend during runtime power management, that's okay. But
its useless for suspend-to-disk. (And I do not see how you could use
it for suspend-to-ram, I hope you do not want that).

A: ƯŸŪڥɤ򤹤Τ ok Ǥ
ǥؤΥڥɤǤΩޤ (ޤϡʤɤΤ褦ˤơ
 RAM ؤΥڥɤ˻Ȥ狼ޤ󤷡ʤʤȤ
˾ߤޤ)

Lets see, so you suggest to

* SUSPEND all but swap device and parents
* Snapshot
* Write image to disk
* SUSPEND swap device and parents
* Powerdown

ƤʤϼΤ褦Ƥ򤷤Ƥޤ

* ֥åץǥХȤοơװʳ *ڥ* ޤ
* ʥåץåȤޤ
* ᡼ǥ˽񤭹ߤޤ
* åץǥХȤοƤ *ڥ* ޤ
* ŸȤޤ

Oh no, that does not work, if swap device or its parents uses DMA,
you've corrupted data. You'd have to do

ʤƻǤ礦Ǥưޤ󡣥åץǥХޤϤοƤ DMA
Ȥʤ顢ǡ˲Ƥޤޤ
Τ褦ˤʤФʤޤ

* SUSPEND all but swap device and parents
* FREEZE swap device and parents
* Snapshot
* UNFREEZE swap device and parents
* Write
* SUSPEND swap device and parents

* ֥åץǥХȤοơװʳ *ڥ* ޤ
* åץǥХȤοƤ *ٻ (ե꡼) * ޤ
* ʥåץåȤޤ
* åץǥХȤοƤ *ٻ (ե꡼) * ޤ
* 񤭹ߤޤ
* åץǥХȤοƤ *ڥ* ޤ

Which means that you still need that FREEZE state, and you get more
complicated code. (And I have not yet introduce details like system
devices).

ϡȤƵٻ߾֤ɬפǡʣʥɤˤʤȤȤǤ
(⡢ϡƥǥХΤ褦ʪξܺ٤򡢤ޤƤޤ)

Q: There don't seem to be any generally useful behavioral
distinctions between SUSPEND and FREEZE.

Q: ڥɤȡٻ (ե꡼) ˡŪΩưζ̤
褦˸ʤΤǤ

A: Doing SUSPEND when you are asked to do FREEZE is always correct,
but it may be unnecessarily slow. If you want USB to stay simple,
slowness may not matter to you. It can always be fixed later.

A: ٻ (ե꡼) ׵κݤˡڥɤԤΤϾȤǤ
ɬפ٤Τޤ
USB ñʤޤޤǤ뤳Ȥ˾ʤ顢٤ΤϤʤˤȤäƽפǤϤʤ⤷
ޤ󡣤ȤǡĤǤ⽤Ǥޤ

For devices like disk it does matter, you do not want to spindown for
FREEZE.

ǥΤ褦ʥǥХǤϤ줬פǡٻ (ե꡼) ΤΥԥ
˾ޤޤ

Q: After resuming, system is paging heavily, leading to very bad interactivity.

Q: 塢ƥबڡ󥰤ơޤȤŪǤʤʤ
Ƥޤޤ

A: Try running

A: ΥޥɤƤ

cat `cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u` > /dev/null

after resume. swapoff -a; swapon -a may also be useful.

塢swapoff -a; swapon -a  ⡢ˤʤ뤫Τޤ

Q: What happens to devices during swsusp? They seem to be resumed
during system suspend?

Q: swsusp δ֡ǥХˤϲޤ ƥबڥɤƤ֤
褦˸ޤ

A: That's correct. We need to resume them if we want to write image to
disk. Whole sequence goes like

A: ̤ꡣǥ˥᡼񤭹ߤʤ顢ǥХɬפ
ޤΤνϼΤ褦ˤʤޤ

      Suspend part

      ʬ
      ~~~~~~~~~~~~
      running system, user asks for suspend-to-disk

      ƥ¹桢桼ǥؤΥڥɤ׵ᤷޤ

      user processes are stopped

      桼ץߤޤ

      suspend(PMSG_FREEZE): devices are frozen so that they don't interfere
      		      with state snapshot

      suspend(PMSG_FREEZE): ǥХϵٻߤΤǡ֤Υʥåץ
      Ȥ⤷ޤ

      state snapshot: copy of whole used memory is taken with interrupts
      disabled

      ֤Υʥåץå: ߤ̵ˤơѺѤߥʣ
      ޤޤ

      resume(): devices are woken up so that we can write image to swap

      resume(): ǥХưΤǡ᡼򥹥åפ˽񤭹ޤ

      write image to swap

      ᡼򥹥åפ˽񤭹ߤޤ

      suspend(PMSG_SUSPEND): suspend devices so that we can power off

      suspend(PMSG_SUSPEND): ǥХڥɤΤǡŸȤޤ

      turn the power off

      ŸȤޤ

      Resume part

      ʬ
      ~~~~~~~~~~~
      (is actually pretty similar)

      (ºݡʤƤޤ)

      running system, user asks for suspend-to-disk

      ƥ¹桢桼ǥؤΥڥɤ׵ᤷޤ

      user processes are stopped (in common case there are none, but with
      resume-from-initrd, noone knows)

      桼ץߤޤ (̾⤢ޤ󤬡initrd 
       (resume-from-initrd) ξ硢ïˤ狼ޤ)

      read image from disk

      ǥ饤᡼ɤ߹ߤޤ

      suspend(PMSG_FREEZE): devices are frozen so that they don't interfere
      		      with image restoration

      suspend(PMSG_FREEZE): ǥХϵٻߤΤǡ᡼
      ޤ

      image restoration: rewrite memory with image

      ᡼: 򥤥᡼ǽ񤭴

      resume(): devices are woken up so that system can continue

      resume(): ǥХưΤǡƥϽ³ޤ

      thaw all user processes

      ٤ƤΥ桼ץϳޤ

Q: What is this 'Encrypt suspend image' for?

Q: 'Ź沽ڥɥ᡼' ϲΤᡩ

A: First of all: it is not a replacement for dm-crypt encrypted swap.
It cannot protect your computer while it is suspended. Instead it does
protect from leaking sensitive data after resume from suspend.

A: Ϥ:  dm-crypt Ź沽åפ֤ǤϤޤ
Ź沽ڥɥ᡼ϡڥΥԥ塼ݸǤޤ
Τꡢڥɤ˵̩ϳ̤餭ȼޤ

Think of the following: you suspend while an application is running
that keeps sensitive data in memory. The application itself prevents
the data from being swapped out. Suspend, however, must write these
data to swap to be able to resume later on. Without suspend encryption
your sensitive data are then stored in plaintext on disk.  This means
that after resume your sensitive data are accessible to all
applications having direct access to the swap device which was used
for suspend. If you don't need swap after resume these data can remain
on disk virtually forever. Thus it can happen that your system gets
broken in weeks later and sensitive data which you thought were
encrypted and protected are retrieved and stolen from the swap device.
To prevent this situation you should use 'Encrypt suspend image'.

ΤȤͤƤߤƤ: 륢ץꥱ󤬥˵̩ݻ
ʤưƤ֤˥ڥɤޤץꥱ󼫿ȤΥǡ
åץȤʤ褦ˤƤޤʤ饵ڥɤȡΤ褦
ǡϡǤ褦ˡåפ˽񤭹ޤʤФޤ
ڥɰŹ沽ʤȡ̩ϤθǥʿʸƥȤ¸
ϡˡڥɤ˻Ȥ줿åץǥХľܥ뤹
٤ƤΥץꥱ󤫤顢̩˥ǤȤȤǤ
åפɬפȤʤʤ顢ΥǡϡۤȤɱʱˡǥ˻Ĥ
Ǥޤäơ֤˥ƥब졢Ź沽ݸƤ
ȻפäƤ̩󤬡åץǥХ졢ޤ뤳Ȥ⤢ꤨޤ
Τ褦ʻ֤ɤˤϡ'Ź沽ڥɥ᡼' Ȥ٤Ǥ

During suspend a temporary key is created and this key is used to
encrypt the data written to disk. When, during resume, the data was
read back into memory the temporary key is destroyed which simply
means that all data written to disk during suspend are then
inaccessible so they can't be stolen later on.  The only thing that
you must then take care of is that you call 'mkswap' for the swap
partition used for suspend as early as possible during regular
boot. This asserts that any temporary key from an oopsed suspend or
from a failed or aborted resume is erased from the swap device.

ڥˡŪʸ졢θǡǥ˽񤭹ޤ줿ǡ
Ź沽ޤơˤϡΥǡϥɤᤵ졢Ūʸ
˲ޤϡñˡڥ˥ǥ˽񤭹ޤ줿٤Ƥ
ǡϤθ奢ǽʤΤǡȤळȤϤǤʤȤȤǤ
ҤȤĤդʤФʤȤϡ̾Υ֡ȤǡǤ᤯
ڥɤ˻Ȥåץѡƥ 'mkswap' ¹Ԥ뤳ȤǤ
ϡԤڥɡ/Ǥ줿Ρ٤ƤΰŪʸ
åץǥХõȤȤǤ

As a rule of thumb use encrypted swap to protect your data while your
system is shut down or suspended. Additionally use the encrypted
suspend image to prevent sensitive data from being stolen after
resume.

礶äѤ˸ȡȤΥƥबåȥ󡢤ޤϥڥɤƤ
˥ǡݸΤˡŹ沽åפȤäƤäơ̩
񤵤뤳ȤɤΤˡŹ沽ڥɥ᡼ȤäƤ

Q: Why can't we suspend to a swap file?

Q: ʤåץե˥ڥɤǤʤΤǤ

A: Because accessing swap file needs the filesystem mounted, and
filesystem might do something wrong (like replaying the journal)
during mount.

A: åץե˥뤿ˤϤΥե륷ƥबޥȤ
ʤФʤʤΤȡޥ (㡼ʥκΤ褦) ե륷
ब򤹤뤫⤷ʤǤ

There are few ways to get that fixed:

ˡϤ鷺ޤ:

1) Probably could be solved by modifying every filesystem to support
some kind of "really read-only!" option. Patches welcome.

1) 餯٤ƤΥե륷ƥ "ɤ߹ߤΤ!" Τ褦ʥץ
򥵥ݡȤ褦ѹ뤳ȤǲǤǤ礦ѥå򴿷ޤޤ

2) suspend2 gets around that by storing absolute positions in on-disk
image (and blocksize), with resume parameter pointing directly to
suspend header.

2) suspnd2 ǤϡǥΥ᡼ (ӥ֥å) а֤¸
ơڥɥإåΰ֤ѥ᡼ľܻؤȤǡΤ褦ʤ
Ȥ褷Ƥޤ

Q: Is there a maximum system RAM size that is supported by swsusp?

Q: swsusp ˤäƥݡȤΥƥ RAM ̤Ϥޤ

A: It should work okay with highmem.

A: highmem ʤưϤǤ

Q: Does swsusp (to disk) use only one swap partition or can it use
multiple swap partitions (aggregate them into one logical space)?

Q: swsusp (ǥؤ) ȤåץѡƥϤҤȤĤǤ
Ȥ⡢ʣΥåץѡƥ (Τñ֤ˤ) Ȥޤ


A: Only one swap partition, sorry.

A: ǰʤ顢(Ȥ) åץѡƥϤҤȤĤǤ

Q: If my application(s) causes lots of memory & swap space to be used
(over half of the total system RAM), is it correct that it is likely
to be useless to try to suspend to disk while that app is running?

Q: ȤäƤ륢ץꥱ󤬡Υȥå (ƥ RAM Ⱦʬ
ʾ) Ȥ硢ץꥱưƤ֤ˡǥؤΥڥɤ
ΩˤʤΤȤǤ

A: No, it should work okay, as long as your app does not mlock()
it. Just prepare big enough swap partition.

A: ȤΥץꥱ󤬤 mlock() ʤ¤ưϤ
ʬ礭ΥåץѡƥѰդϤƤ

Q: What information is usefull for debugging suspend-to-disk problems?

Q: ǥؤΥڥɤǥХåΤΩľϤʤǤ

A: Well, last messages on the screen are always useful. If something
is broken, it is usually some kernel driver, therefore trying with as
little as possible modules loaded helps a lot. I also prefer people to
suspend from console, preferably without X running. Booting with
init=/bin/bash, then swapon and starting suspend sequence manually
usually does the trick. Then it is good idea to try with latest
vanilla kernel.

A: Ǥ̤͡˺ǸɽåϾͭѤǤ
Ƥʤ顢̾綠ϥͥɥ饤ФʤΤǡɬ׺Ǿ¤Υ⥸塼
ɤƻȤ礭ʽˤʤޤޤʤ٤ X ¹ԤƤʤ
󥽡뤫饵ڥɤۤ褤Ǥinit=/bin/bash ǵưǡ
swapon ڥɥ󥹤ưǳϤ뤳ȤϡŪˤޤ
ǤˡǿǤ (vanilla) ͥǻΤɤͤǤ
