kernel/power/Kconfig

Source file repositories/reference/linux-study-clean/kernel/power/Kconfig

File Facts

System
Linux kernel
Corpus path
kernel/power/Kconfig
Extension
[no extension]
Size
13922 bytes
Lines
405
Domain
Core OS
Bucket
Scheduler, Processes, Timers, Sync, And Syscalls
Inferred role
Core OS: build/configuration rule
Status
atlas-only

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0-only
config SUSPEND
	bool "Suspend to RAM and standby"
	depends on ARCH_SUSPEND_POSSIBLE
	default y
	help
	  Allow the system to enter sleep states in which main memory is
	  powered and thus its contents are preserved, such as the
	  suspend-to-RAM state (e.g. the ACPI S3 state).

config SUSPEND_FREEZER
	bool "Enable freezer for suspend to RAM/standby" \
		if ARCH_WANTS_FREEZER_CONTROL || BROKEN
	depends on SUSPEND
	default y
	help
	  This allows you to turn off the freezer for suspend. If this is
	  done, no tasks are frozen for suspend to RAM/standby.

	  Turning OFF this setting is NOT recommended! If in doubt, say Y.

config SUSPEND_SKIP_SYNC
	bool "Skip kernel's sys_sync() on suspend to RAM/standby"
	depends on SUSPEND
	depends on EXPERT
	help
	  Skip the kernel sys_sync() before freezing user processes.
	  Some systems prefer not to pay this cost on every invocation
	  of suspend, or they are content with invoking sync() from
	  user-space before invoking suspend.  There's a run-time switch
	  at '/sys/power/sync_on_suspend' to configure this behaviour.
	  This setting changes the default for the run-tim switch. Say Y
	  to change the default to disable the kernel sys_sync().

config HIBERNATE_CALLBACKS
	bool

config HIBERNATION
	bool "Hibernation (aka 'suspend to disk')"
	depends on SWAP && ARCH_HIBERNATION_POSSIBLE
	select HIBERNATE_CALLBACKS
	select CRC32
	select CRYPTO
	select CRYPTO_LZO
	select CRYPTO_LZ4
	help
	  Enable the suspend to disk (STD) functionality, which is usually
	  called "hibernation" in user interfaces.  STD checkpoints the
	  system and powers it off; and restores that checkpoint on reboot.

	  You can suspend your machine with 'echo disk > /sys/power/state'
	  after placing resume=/dev/swappartition on the kernel command line
	  in your bootloader's configuration file.

	  Alternatively, you can use the additional userland tools available
	  from <http://suspend.sf.net>.

	  In principle it does not require ACPI or APM, although for example
	  ACPI will be used for the final steps when it is available.  One
	  of the reasons to use software suspend is that the firmware hooks
	  for suspend states like suspend-to-RAM (STR) often don't work very
	  well with Linux.

	  It creates an image which is saved in your active swap. Upon the next
	  boot, pass the 'resume=/dev/swappartition' argument to the kernel to
	  have it detect the saved image, restore memory state from it, and
	  continue to run as before. If you do not want the previous state to
	  be reloaded, then use the 'noresume' kernel command line argument.
	  Note, however, that fsck will be run on your filesystems and you will
	  need to run mkswap against the swap partition used for the suspend.

Annotation

Implementation Notes