mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 05:16:44 +07:00
dc52ddc0e6
This patch implements a new freezer subsystem in the control groups framework. It provides a way to stop and resume execution of all tasks in a cgroup by writing in the cgroup filesystem. The freezer subsystem in the container filesystem defines a file named freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup. Reading will return the current state. * Examples of usage : # mkdir /containers/freezer # mount -t cgroup -ofreezer freezer /containers # mkdir /containers/0 # echo $some_pid > /containers/0/tasks to get status of the freezer subsystem : # cat /containers/0/freezer.state RUNNING to freeze all tasks in the container : # echo FROZEN > /containers/0/freezer.state # cat /containers/0/freezer.state FREEZING # cat /containers/0/freezer.state FROZEN to unfreeze all tasks in the container : # echo RUNNING > /containers/0/freezer.state # cat /containers/0/freezer.state RUNNING This is the basic mechanism which should do the right thing for user space task in a simple scenario. It's important to note that freezing can be incomplete. In that case we return EBUSY. This means that some tasks in the cgroup are busy doing something that prevents us from completely freezing the cgroup at this time. After EBUSY, the cgroup will remain partially frozen -- reflected by freezer.state reporting "FREEZING" when read. The state will remain "FREEZING" until one of these things happens: 1) Userspace cancels the freezing operation by writing "RUNNING" to the freezer.state file 2) Userspace retries the freezing operation by writing "FROZEN" to the freezer.state file (writing "FREEZING" is not legal and returns EIO) 3) The tasks that blocked the cgroup from entering the "FROZEN" state disappear from the cgroup's set of tasks. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: export thaw_process] Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Matt Helsley <matthltc@us.ibm.com> Acked-by: Serge E. Hallyn <serue@us.ibm.com> Tested-by: Matt Helsley <matthltc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
305 lines
7.7 KiB
Plaintext
305 lines
7.7 KiB
Plaintext
# For a description of the syntax of this configuration file,
|
|
# see Documentation/kbuild/kconfig-language.txt.
|
|
#
|
|
|
|
mainmenu "Linux/SPARC Kernel Configuration"
|
|
|
|
config MMU
|
|
bool
|
|
default y
|
|
|
|
config HIGHMEM
|
|
bool
|
|
default y
|
|
|
|
config ZONE_DMA
|
|
bool
|
|
default y
|
|
|
|
config GENERIC_ISA_DMA
|
|
bool
|
|
default y
|
|
|
|
config GENERIC_GPIO
|
|
bool
|
|
help
|
|
Generic GPIO API support
|
|
|
|
config ARCH_NO_VIRT_TO_BUS
|
|
def_bool y
|
|
|
|
config OF
|
|
def_bool y
|
|
|
|
config HZ
|
|
int
|
|
default 100
|
|
|
|
source "init/Kconfig"
|
|
|
|
source "kernel/Kconfig.freezer"
|
|
|
|
menu "General machine setup"
|
|
|
|
config SMP
|
|
bool "Symmetric multi-processing support (does not work on sun4/sun4c)"
|
|
---help---
|
|
This enables support for systems with more than one CPU. If you have
|
|
a system with only one CPU, say N. If you have a system with more
|
|
than one CPU, say Y.
|
|
|
|
If you say N here, the kernel will run on single and multiprocessor
|
|
machines, but will use only one CPU of a multiprocessor machine. If
|
|
you say Y here, the kernel will run on many, but not all,
|
|
singleprocessor machines. On a singleprocessor machine, the kernel
|
|
will run faster if you say N here.
|
|
|
|
People using multiprocessor machines who say Y here should also say
|
|
Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
|
|
Management" code will be disabled if you say Y here.
|
|
|
|
See also <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO
|
|
available at <http://www.tldp.org/docs.html#howto>.
|
|
|
|
If you don't know what to do here, say N.
|
|
|
|
config NR_CPUS
|
|
int "Maximum number of CPUs (2-32)"
|
|
range 2 32
|
|
depends on SMP
|
|
default "32"
|
|
|
|
config SPARC
|
|
bool
|
|
default y
|
|
select HAVE_IDE
|
|
select HAVE_OPROFILE
|
|
select HAVE_ARCH_KGDB if !SMP
|
|
select HAVE_ARCH_TRACEHOOK
|
|
select ARCH_WANT_OPTIONAL_GPIOLIB
|
|
select RTC_CLASS
|
|
select RTC_DRV_M48T59
|
|
|
|
# Identify this as a Sparc32 build
|
|
config SPARC32
|
|
bool
|
|
default y
|
|
help
|
|
SPARC is a family of RISC microprocessors designed and marketed by
|
|
Sun Microsystems, incorporated. They are very widely found in Sun
|
|
workstations and clones. This port covers the original 32-bit SPARC;
|
|
it is old and stable and usually considered one of the "big three"
|
|
along with the Intel and Alpha ports. The UltraLinux project
|
|
maintains both the SPARC32 and SPARC64 ports; its web page is
|
|
available at <http://www.ultralinux.org/>.
|
|
|
|
# Global things across all Sun machines.
|
|
config ISA
|
|
bool
|
|
help
|
|
ISA is found on Espresso only and is not supported currently.
|
|
Say N
|
|
|
|
config EISA
|
|
bool
|
|
help
|
|
EISA is not supported.
|
|
Say N
|
|
|
|
config MCA
|
|
bool
|
|
help
|
|
MCA is not supported.
|
|
Say N
|
|
|
|
config PCMCIA
|
|
tristate
|
|
---help---
|
|
Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
|
|
computer. These are credit-card size devices such as network cards,
|
|
modems or hard drives often used with laptops computers. There are
|
|
actually two varieties of these cards: the older 16 bit PCMCIA cards
|
|
and the newer 32 bit CardBus cards. If you want to use CardBus
|
|
cards, you need to say Y here and also to "CardBus support" below.
|
|
|
|
To use your PC-cards, you will need supporting software from David
|
|
Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
|
|
for location). Please also read the PCMCIA-HOWTO, available from
|
|
<http://www.tldp.org/docs.html#howto>.
|
|
|
|
To compile this driver as modules, choose M here: the
|
|
modules will be called pcmcia_core and ds.
|
|
|
|
config SBUS
|
|
bool
|
|
default y
|
|
|
|
config SBUSCHAR
|
|
bool
|
|
default y
|
|
|
|
config SERIAL_CONSOLE
|
|
bool
|
|
default y
|
|
---help---
|
|
If you say Y here, it will be possible to use a serial port as the
|
|
system console (the system console is the device which receives all
|
|
kernel messages and warnings and which allows logins in single user
|
|
mode). This could be useful if some terminal or printer is connected
|
|
to that serial port.
|
|
|
|
Even if you say Y here, the currently visible virtual console
|
|
(/dev/tty0) will still be used as the system console by default, but
|
|
you can alter that using a kernel command line option such as
|
|
"console=ttyS1". (Try "man bootparam" or see the documentation of
|
|
your boot loader (silo) about how to pass options to the kernel at
|
|
boot time.)
|
|
|
|
If you don't have a graphics card installed and you say Y here, the
|
|
kernel will automatically use the first serial line, /dev/ttyS0, as
|
|
system console.
|
|
|
|
If unsure, say N.
|
|
|
|
config SUN_AUXIO
|
|
bool
|
|
default y
|
|
|
|
config SUN_IO
|
|
bool
|
|
default y
|
|
|
|
config RWSEM_GENERIC_SPINLOCK
|
|
bool
|
|
default y
|
|
|
|
config RWSEM_XCHGADD_ALGORITHM
|
|
bool
|
|
|
|
config GENERIC_FIND_NEXT_BIT
|
|
bool
|
|
default y
|
|
|
|
config GENERIC_HWEIGHT
|
|
bool
|
|
default y
|
|
|
|
config GENERIC_CALIBRATE_DELAY
|
|
bool
|
|
default y
|
|
|
|
config ARCH_MAY_HAVE_PC_FDC
|
|
bool
|
|
default y
|
|
|
|
config ARCH_HAS_ILOG2_U32
|
|
bool
|
|
default n
|
|
|
|
config ARCH_HAS_ILOG2_U64
|
|
bool
|
|
default n
|
|
|
|
config EMULATED_CMPXCHG
|
|
bool
|
|
default y
|
|
help
|
|
Sparc32 does not have a CAS instruction like sparc64. cmpxchg()
|
|
is emulated, and therefore it is not completely atomic.
|
|
|
|
config SUN_PM
|
|
bool
|
|
default y
|
|
help
|
|
Enable power management and CPU standby features on supported
|
|
SPARC platforms.
|
|
|
|
config PCI
|
|
bool "Support for PCI and PS/2 keyboard/mouse"
|
|
help
|
|
CONFIG_PCI is needed for all JavaStation's (including MrCoffee),
|
|
CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC.
|
|
All of these platforms are extremely obscure, so say N if unsure.
|
|
|
|
config PCI_SYSCALL
|
|
def_bool PCI
|
|
|
|
source "drivers/pci/Kconfig"
|
|
|
|
config SUN_OPENPROMFS
|
|
tristate "Openprom tree appears in /proc/openprom"
|
|
help
|
|
If you say Y, the OpenPROM device tree will be available as a
|
|
virtual file system, which you can mount to /proc/openprom by "mount
|
|
-t openpromfs none /proc/openprom".
|
|
|
|
To compile the /proc/openprom support as a module, choose M here: the
|
|
module will be called openpromfs.
|
|
|
|
Only choose N if you know in advance that you will not need to modify
|
|
OpenPROM settings on the running system.
|
|
|
|
config SPARC_LED
|
|
tristate "Sun4m LED driver"
|
|
help
|
|
This driver toggles the front-panel LED on sun4m systems
|
|
in a user-specifiable manner. Its state can be probed
|
|
by reading /proc/led and its blinking mode can be changed
|
|
via writes to /proc/led
|
|
|
|
source "fs/Kconfig.binfmt"
|
|
|
|
source "mm/Kconfig"
|
|
|
|
endmenu
|
|
|
|
source "net/Kconfig"
|
|
|
|
source "drivers/Kconfig"
|
|
|
|
source "drivers/sbus/char/Kconfig"
|
|
|
|
# This one must be before the filesystem configs. -DaveM
|
|
|
|
menu "Unix98 PTY support"
|
|
|
|
config UNIX98_PTYS
|
|
bool "Unix98 PTY support"
|
|
---help---
|
|
A pseudo terminal (PTY) is a software device consisting of two
|
|
halves: a master and a slave. The slave device behaves identical to
|
|
a physical terminal; the master device is used by a process to
|
|
read data from and write data to the slave, thereby emulating a
|
|
terminal. Typical programs for the master side are telnet servers
|
|
and xterms.
|
|
|
|
Linux has traditionally used the BSD-like names /dev/ptyxx for
|
|
masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
|
|
has a number of problems. The GNU C library glibc 2.1 and later,
|
|
however, supports the Unix98 naming standard: in order to acquire a
|
|
pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
|
|
terminal is then made available to the process and the pseudo
|
|
terminal slave can be accessed as /dev/pts/<number>. What was
|
|
traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
|
|
|
|
The entries in /dev/pts/ are created on the fly by a virtual
|
|
file system; therefore, if you say Y here you should say Y to
|
|
"/dev/pts file system for Unix98 PTYs" as well.
|
|
|
|
If you want to say Y here, you need to have the C library glibc 2.1
|
|
or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
|
|
Read the instructions in <file:Documentation/Changes> pertaining to
|
|
pseudo terminals. It's safe to say N.
|
|
|
|
endmenu
|
|
|
|
source "fs/Kconfig"
|
|
|
|
source "arch/sparc/Kconfig.debug"
|
|
|
|
source "security/Kconfig"
|
|
|
|
source "crypto/Kconfig"
|
|
|
|
source "lib/Kconfig"
|